aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-08-10 15:24:43 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-08-10 15:24:43 +0200
commitd998efcf54f3a7ec202a98555c70094aede7ec42 (patch)
treea69aa6fd09f7d8a8f386bb7f3520c6a3dbde213b /phpBB/includes/functions.php
parent58a863dbadbb316076647cfa235c69951d66df77 (diff)
parent54b0ebc4106b985053e0c1827283e77fcfb596af (diff)
downloadforums-d998efcf54f3a7ec202a98555c70094aede7ec42.tar
forums-d998efcf54f3a7ec202a98555c70094aede7ec42.tar.gz
forums-d998efcf54f3a7ec202a98555c70094aede7ec42.tar.bz2
forums-d998efcf54f3a7ec202a98555c70094aede7ec42.tar.xz
forums-d998efcf54f3a7ec202a98555c70094aede7ec42.zip
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [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 Conflicts: phpBB/config/services.yml
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]))