diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-03 16:03:19 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-03 16:03:19 +0000 |
| commit | 9e4123cc2a54fffb671ec67577b46046a16d899c (patch) | |
| tree | 845c79ec43a2a0f2afe4a59b3e7c68a2b7e82b86 /roundcubemail/program/include/main.inc | |
| parent | 07a784e33e1670162b315139ff52ecdf825429e5 (diff) | |
Auto-detect client language and timezone if desired by config/prefs
git-svn-id: https://svn.roundcube.net/trunk@1722 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 83ed8c02e..469d8441c 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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); |
