Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab
This commit is contained in:
commit
6dbbdba8a0
1 changed files with 10 additions and 3 deletions
|
@ -75,8 +75,15 @@ class libcalendaring extends rcube_plugin
|
||||||
$this->rc = rcube::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
// set user's timezone
|
// set user's timezone
|
||||||
|
try {
|
||||||
$this->timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT'));
|
$this->timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT'));
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
$this->timezone = new DateTimeZone('GMT');
|
||||||
|
}
|
||||||
|
|
||||||
$now = new DateTime('now', $this->timezone);
|
$now = new DateTime('now', $this->timezone);
|
||||||
|
|
||||||
$this->gmt_offset = $now->getOffset();
|
$this->gmt_offset = $now->getOffset();
|
||||||
$this->dst_active = $now->format('I');
|
$this->dst_active = $now->format('I');
|
||||||
$this->timezone_offset = $this->gmt_offset / 3600 - $this->dst_active;
|
$this->timezone_offset = $this->gmt_offset / 3600 - $this->dst_active;
|
||||||
|
|
Loading…
Add table
Reference in a new issue