mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
[ticket/12858] Use UTC for time info in footer and hide offset if it's 0
PHPBB3-12858
This commit is contained in:
@@ -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]))
|
||||
{
|
||||
|
Reference in New Issue
Block a user