summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-03-07 07:57:19 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-03-07 07:57:19 (GMT)
commit6063a03c19d183f157efc2378327c96213a65606 (patch)
tree4ece0a4446cfcbb23b412b3fec014d19591b51d7
parenta94f69a0ad65f4227b1520473a7c2785073e5e6a (diff)
downloadroundcubemail-plugins-kolab-6063a03c19d183f157efc2378327c96213a65606.tar.gz
Shift dates to user's timezone before computing recurrences (#1681)
-rw-r--r--plugins/libkolab/lib/kolab_date_recurrence.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php
index 0dbd3ff..b33f911 100644
--- a/plugins/libkolab/lib/kolab_date_recurrence.php
+++ b/plugins/libkolab/lib/kolab_date_recurrence.php
@@ -42,6 +42,11 @@ class kolab_date_recurrence
function __construct($event)
{
$this->object = $object = $event->to_array();
+
+ // shift dates to user's timezone to correctly compute times across DST changes
+ $object['start']->setTimezone(kolab_format::$timezone);
+ $object['end']->setTimezone(kolab_format::$timezone);
+
$this->next = new Horde_Date($object['start'], kolab_format::$timezone->getName());
if (is_object($object['start']) && is_object($object['end']))