aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-08-10 15:23:15 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-08-10 15:23:15 +0200
commit54b0ebc4106b985053e0c1827283e77fcfb596af (patch)
treec024029d308d89ed7279fcc50de955a629f8f445 /phpBB/includes/functions.php
parent472fe9fe60fc60a8f540456736e10f92b9809cd6 (diff)
parentf0852dcf1af3b0c99cfa71618b543b4f7ab7ccbe (diff)
downloadforums-54b0ebc4106b985053e0c1827283e77fcfb596af.tar
forums-54b0ebc4106b985053e0c1827283e77fcfb596af.tar.gz
forums-54b0ebc4106b985053e0c1827283e77fcfb596af.tar.bz2
forums-54b0ebc4106b985053e0c1827283e77fcfb596af.tar.xz
forums-54b0ebc4106b985053e0c1827283e77fcfb596af.zip
Merge pull request #2862 from marc1706/ticket/12932
[ticket/12932] Add method for allowing override of \phpbb\datetime class * marc1706/ticket/12932: [ticket/12932] Remove set_datetime_class method from user class [ticket/12932] Fix tests and calls to create_datetime [ticket/12932] Add method for getting the datetime class and allow overriding
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 53ccf2df2c..6a2edb0d58 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('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();
$timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
$timezone_name = $user->timezone->getName();
if (isset($user->lang['timezones'][$timezone_name]))