aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-06-04 19:19:34 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-06-18 15:07:44 +0200
commit00b5e5345dc44c99340bba932522b6b05b48dab2 (patch)
treedb205fa139b217088188960b1ff0fdf1da4cb042 /phpBB/includes/functions.php
parent50936cb2eff3f80d99390c76ef6ac535e73f6cc3 (diff)
downloadforums-00b5e5345dc44c99340bba932522b6b05b48dab2.tar
forums-00b5e5345dc44c99340bba932522b6b05b48dab2.tar.gz
forums-00b5e5345dc44c99340bba932522b6b05b48dab2.tar.bz2
forums-00b5e5345dc44c99340bba932522b6b05b48dab2.tar.xz
forums-00b5e5345dc44c99340bba932522b6b05b48dab2.zip
[feature/new-tz-handling] Fix displaying of "All times are" string
PHPBB3-9558
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 55f7f0531c..44346c7795 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4769,6 +4769,14 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
}
+ $dt = new phpbb_datetime('now', $user->tz);
+ $timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
+ $timezone_name = $user->tz->getName();
+ if (isset($user->lang['timezones'][$timezone_name]))
+ {
+ $timezone_name = $user->lang['timezones'][$timezone_name];
+ }
+
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -4836,7 +4844,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
'S_CONTENT_ENCODING' => 'UTF-8',
- 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
+ 'S_TIMEZONE' => sprintf($user->lang['ALL_TIMES'], $timezone_offset, $timezone_name),
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
'S_DISPLAY_PM' => ($config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,