mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12858] Use UTC for time info in footer and hide offset if it's 0
PHPBB3-12858
This commit is contained in:
parent
9ebee7de32
commit
3dbac0f88b
1 changed files with 6 additions and 1 deletions
|
@ -945,6 +945,11 @@ function phpbb_format_timezone_offset($tz_offset)
|
|||
$sign = ($tz_offset < 0) ? '-' : '+';
|
||||
$time_offset = abs($tz_offset);
|
||||
|
||||
if ($time_offset == 0)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$offset_seconds = $time_offset % 3600;
|
||||
$offset_minutes = $offset_seconds / 60;
|
||||
$offset_hours = ($time_offset - $offset_seconds) / 3600;
|
||||
|
@ -4913,7 +4918,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
|||
}
|
||||
|
||||
$dt = $user->create_datetime();
|
||||
$timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
|
||||
$timezone_offset = $user->lang('UTC') . phpbb_format_timezone_offset($dt->getOffset());
|
||||
$timezone_name = $user->timezone->getName();
|
||||
if (isset($user->lang['timezones'][$timezone_name]))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue