Since the list of timezones is very long, and users are likely
to know their current offset but not necessarily which city
that is nearby is in the timezone database, sort the list of
timezones by offset.
UTC is specially handled to show up before other GMT+0 timezones.
PHPBB3-9558
tz_select() now uses the PHP timezone database to generate the timezone
selection box, it tries to use a translated language string otherwise falls
back to a label produced from the timezone identifier. I've done this so
new timezones are available immediately without a new language pack.
PHPBB3-9558
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
Future dates can get formatted as 'less than a minute ago' if they
occur in the future on the same minute as the current minute.
PHPBB3-9558 PHPBB3-9712
- Added comments explaining the complex time computations for rendering
relative date times.
- Replaced some repeated method invokations with variables.
PHPBB3-9558
user::$tz will store the new DateTimeZone object representing the users
timezone instead of the existing user::$timezone and user::$dst combination.
PHPBB3-9558
user::setup() now stores a DateTimeZone object in user::$timezone representing
the users timezone. For backwards compatibility a numeric value in
user/board_timezone will be converted into one of the legacy Etc/GMT±X
timezones. This will be used until the user updates his/her timezone in the
UCP.
user::format_date() is now basically a legacy wrapper that transforms a UTC
UNIX timestamp into a formatted localised date using phpbb_datetime::format().
PHPBB3-9558
Wrapped PHP's DateTime with some extensions for supporting phpBB's relative
date formats and provided the DateTime::getTimestamp() method to PHP < 5.3.
PHPBB3-9558
Regression from the ticket PHPBB3-9008 fix.
When topic marking was enabled for guests, and a guest visited a forum with
a new topic which is marked unread, the built SQL missed an alias for a
TOPICS_TABLE which resulted in the following error:
Unknown column 't.topic_approved' in 'where clause' [1054]
The fix is to add an alias for the table.
PHPBB3-10497
PHPBB3-9008
* develop-olympus:
[ticket/10461] Add a comment explaining the logic here.
[ticket/10461] Correct $log_count check in view_log() so we show logs again.
* prep-release-3.0.10:
[ticket/10461] Add a comment explaining the logic here.
[ticket/10461] Correct $log_count check in view_log() so we show logs again.
We pass $log_count as false now when we do not need to know how many log
entries there are. However when $log_count is false, $log_count == 0 will be
true as well and thus we will return early with 0.
PHPBB3-9874
PHPBB3-10461