diff options
author | alecpl <alec@alec.pl> | 2011-08-31 12:49:44 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-08-31 12:49:44 +0000 |
commit | b08caf5813c43e8648cdf5db1e003b3046a37c2c (patch) | |
tree | e87f3c8cd0802c550459f26de1473bbcd4107131 /program/include/rcube_config.php | |
parent | fd6146b6780c526a04682cda89b133e2d9bbd910 (diff) |
- Applied fixes from trunk up to r5150
Diffstat (limited to 'program/include/rcube_config.php')
-rw-r--r-- | program/include/rcube_config.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index 9379e9e7b..31b7ed6b7 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -220,6 +220,19 @@ class rcube_config return $this->prop; } + /** + * Special getter for user's timezone + */ + public function get_timezone() + { + $tz = $this->get('timezone'); + if ($tz == 'auto') + $tz = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : date('Z') / 3600; + else + $tz = intval($tz) + intval($this->get('dst_active')); + + return $tz; + } /** * Return requested DES crypto key. |