diff options
author | Chris Smith <toonarmy@phpbb.com> | 2010-07-07 23:42:54 +0100 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-03-14 22:57:30 -0400 |
commit | 1665434853fb09e70337d23955e1c9a5f3f0d19d (patch) | |
tree | a7b146dbed891e176954a302bdd0ee434e24d083 /phpBB/memberlist.php | |
parent | af789040b8880f908df0a26d5239d07d77c34124 (diff) | |
download | forums-1665434853fb09e70337d23955e1c9a5f3f0d19d.tar forums-1665434853fb09e70337d23955e1c9a5f3f0d19d.tar.gz forums-1665434853fb09e70337d23955e1c9a5f3f0d19d.tar.bz2 forums-1665434853fb09e70337d23955e1c9a5f3f0d19d.tar.xz forums-1665434853fb09e70337d23955e1c9a5f3f0d19d.zip |
[feature/new-tz-handling] Remove code using legacy timezone properties.
Code accessing the legacy user::$timezone and user::$dst properties
has been removed and replaced with code utilising user::create_datetime().
Changed by Oleg:
in viewtopic, memberlist and index use getTimestamp() + getOffset().
We show members that have birthdays on the specified date.
getTimestamp() returns the current date in UTC. We add getOffset() to
obtain the current local time in the viewing user's timezone.
Then we find members having birthday on this date.
Changed by Oleg again:
Take leap year status out of the datetime object we have, this seems
like it should work as one would expect.
PHPBB3-9558
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 556db2fa5d..ea8a6fc44b 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1684,7 +1684,8 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f if ($bday_year) { - $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); + $now = $user->create_datetime(); + $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset()); $diff = $now['mon'] - $bday_month; if ($diff == 0) |