From 9836efc13c73ddf2382a40cb8ce5a4181d5831ca Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 18 Jun 2012 11:03:39 +0200 Subject: [PATCH] [feature/new-tz-handling] Inject $user to avoid the usage of global PHPBB3-9558 --- phpBB/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9263833b4c..19e59f2ddb 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1145,7 +1145,7 @@ function tz_select($default = '', $truncate = false, $return_tzs_only = true) foreach ($unsorted_timezones as $timezone) { $tz = new DateTimeZone($timezone); - $dt = new phpbb_datetime('now', $tz); + $dt = new phpbb_datetime('now', $tz, $user); $offset = $dt->getOffset(); $current_time = $dt->format($user->lang['DATETIME_FORMAT'], true); $offset_string = phpbb_format_timezone_offset($offset); @@ -4794,7 +4794,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 } } - $dt = new phpbb_datetime('now', $user->tz); + $dt = new phpbb_datetime('now', $user->tz, $user); $timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset()); $timezone_name = $user->tz->getName(); if (isset($user->lang['timezones'][$timezone_name]))