Branch 'roundcubemail-plugins-kolab-0.7' - plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Mon Oct 29 14:25:06 CET 2012


 plugins/calendar/lib/calendar_recurrence.php |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 17c19562cc26e676099a9b55e5bd5e75ce7f5de3
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Mon Oct 22 14:24:54 2012 +0200

    Reactivate fix for daylight saving differences between base event and recurring instance

diff --git a/plugins/calendar/lib/calendar_recurrence.php b/plugins/calendar/lib/calendar_recurrence.php
index 0354080..fac87fb 100644
--- a/plugins/calendar/lib/calendar_recurrence.php
+++ b/plugins/calendar/lib/calendar_recurrence.php
@@ -76,12 +76,15 @@ class calendar_recurrence
   {
     $time = false;
     if ($this->next && ($next = $this->engine->nextActiveRecurrence(array('year' => $this->next->year, 'month' => $this->next->month, 'mday' => $this->next->mday + 1, 'hour' => $this->next->hour, 'min' => $this->next->min, 'sec' => $this->next->sec)))) {
+      # consider difference in daylight saving between base event and recurring instance
+      $dst_diff = ($this->dst_start - $next->format('I')) * 3600;
+      # fix time for all-day events
       if ($this->event['allday']) {
-        $next->hour = $this->hour;  # fix time for all-day events
+        $next->hour = $this->hour;
         $next->min = 0;
+        $dst_diff = 0;
       }
-      # $dst_diff = ($this->dst_start - $next->format('I')) * 3600;  # consider difference in daylight saving between base event and recurring instance
-      $time = $next->timestamp() - $this->tz_offset;
+      $time = $next->timestamp() - $this->tz_offset - $dst_diff;
       $this->next = $next;
     }
 





More information about the commits mailing list