aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-06-18 11:03:39 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-06-18 15:10:33 +0200
commit9836efc13c73ddf2382a40cb8ce5a4181d5831ca (patch)
tree24b2e700e4eb1c92e765618e8270c8ce86ba544a /phpBB/includes/functions.php
parent2a880dafdfacb1bc56652976078a3bd3104ceaf9 (diff)
downloadforums-9836efc13c73ddf2382a40cb8ce5a4181d5831ca.tar
forums-9836efc13c73ddf2382a40cb8ce5a4181d5831ca.tar.gz
forums-9836efc13c73ddf2382a40cb8ce5a4181d5831ca.tar.bz2
forums-9836efc13c73ddf2382a40cb8ce5a4181d5831ca.tar.xz
forums-9836efc13c73ddf2382a40cb8ce5a4181d5831ca.zip
[feature/new-tz-handling] Inject $user to avoid the usage of global
PHPBB3-9558
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 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]))