Branch 'roundcubemail-plugins-kolab-format2-horde5' - plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Thu Mar 7 08:57:28 CET 2013


 plugins/libkolab/lib/kolab_date_recurrence.php |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6063a03c19d183f157efc2378327c96213a65606
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Mar 7 08:57:19 2013 +0100

    Shift dates to user's timezone before computing recurrences (#1681)

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']))





More information about the commits mailing list