diff options
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 83ed8c02e..469d8441c 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -706,9 +706,13 @@ function format_date($date, $format=NULL) return ''; // get user's timezone - $tz = $CONFIG['timezone']; - if ($CONFIG['dst_active']) - $tz++; + if ($CONFIG['timezone'] == 'auto') + $tz = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : intval(date('O'))/100; + else { + $tz = $CONFIG['timezone']; + if ($CONFIG['dst_active']) + $tz++; + } // convert time to user's timezone $timestamp = $ts - date('Z', $ts) + ($tz * 3600); |