Use common method to get user's timezone

This commit is contained in:
Thomas 2011-08-28 23:14:48 +02:00
parent 166bf43f2d
commit e1d083f376

View file

@ -85,11 +85,7 @@ class calendar extends rcube_plugin
$this->add_texts('localization/', $this->rc->task == 'calendar' && (!$this->rc->action || $this->rc->action == 'print'));
// set user's timezone
if ($this->rc->config->get('timezone') === 'auto')
$this->timezone = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : date('Z');
else
$this->timezone = ($this->rc->config->get('timezone') + intval($this->rc->config->get('dst_active')));
$this->timezone = $this->rc->config->get_timezone();
$this->gmt_offset = $this->timezone * 3600;
require($this->home . '/lib/calendar_ui.php');