diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-28 14:21:41 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-28 14:21:41 +0000 |
| commit | c41f6c7a587d9a84c4ddb43f61a7bcb2cf4085ae (patch) | |
| tree | 5e6e9b8e259259cbb004580070348794eb052efa /roundcubemail/program/include/rcube_config.php | |
| parent | 9d05faec1bb4f8e06cb11c0e96e4f42431c47e98 (diff) | |
Fix timezone settings
git-svn-id: https://svn.roundcube.net/trunk@5287 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_config.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_config.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_config.php b/roundcubemail/program/include/rcube_config.php index 4e402354d..1c8e23733 100644 --- a/roundcubemail/program/include/rcube_config.php +++ b/roundcubemail/program/include/rcube_config.php @@ -93,9 +93,8 @@ class rcube_config // set timezone auto settings values if ($this->prop['timezone'] == 'auto') { - $this->prop['_timezone_auto'] = true; $this->prop['dst_active'] = intval(date('I')); - $this->prop['timezone'] = date('Z') / 3600 - $this->prop['dst_active']; + $this->prop['_timezone_value'] = date('Z') / 3600 - $this->prop['dst_active']; } // export config data @@ -159,6 +158,9 @@ class rcube_config { $result = isset($this->prop[$name]) ? $this->prop[$name] : $def; $rcmail = rcmail::get_instance(); + + if ($name == 'timezone' && isset($this->prop['_timezone_value'])) + $result = $this->prop['_timezone_value']; if (is_object($rcmail->plugins)) { $plugin = $rcmail->plugins->exec_hook('config_get', array( @@ -216,8 +218,8 @@ class rcube_config $this->prop = array_merge($this->prop, $prefs); // override timezone settings with client values - if ($this->prop['_timezone_auto']) { - $this->prop['timezone'] = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['timezone']; + if ($this->prop['timezone'] == 'auto') { + $this->prop['_timezone_value'] = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['_timezone_value']; $this->prop['dst_active'] = isset($_SESSION['dst_active']) ? $_SESSION['dst_active'] : $this->prop['dst_active']; } } |
