diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-08-10 12:55:49 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-08-10 13:41:08 +0200 |
commit | a57a96cbddbfdad65823aeca2901f26b62c9b12d (patch) | |
tree | 22ef0efa2366d64f71f99f38f0403f1ef4ea17db /phpBB/includes/functions.php | |
parent | 7cc9f216e71de8515d5adb8e4fb48e3f6456d689 (diff) | |
download | forums-a57a96cbddbfdad65823aeca2901f26b62c9b12d.tar forums-a57a96cbddbfdad65823aeca2901f26b62c9b12d.tar.gz forums-a57a96cbddbfdad65823aeca2901f26b62c9b12d.tar.bz2 forums-a57a96cbddbfdad65823aeca2901f26b62c9b12d.tar.xz forums-a57a96cbddbfdad65823aeca2901f26b62c9b12d.zip |
[ticket/12932] Add method for getting the datetime class and allow overriding
An extension can now override the datetime class by overwriting the
datetime.class parameter in their own yml file.
PHPBB3-12932
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index bd0a5795b1..065f38f4dc 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1061,7 +1061,7 @@ function phpbb_timezone_select($user, $default = '', $truncate = false) foreach ($unsorted_timezones as $timezone) { $tz = new DateTimeZone($timezone); - $dt = new \phpbb\datetime($user, 'now', $tz); + $dt = $user->create_datetime($user, 'now', $tz); $offset = $dt->getOffset(); $current_time = $dt->format($user->lang['DATETIME_FORMAT'], true); $offset_string = phpbb_format_timezone_offset($offset); @@ -4881,7 +4881,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = } } - $dt = new \phpbb\datetime($user, 'now', $user->timezone); + $dt = $user->create_datetime($user, 'now', $user->timezone); $timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset()); $timezone_name = $user->timezone->getName(); if (isset($user->lang['timezones'][$timezone_name])) |