summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-10-22 12:24:54 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-10-22 12:24:54 (GMT)
commit17c19562cc26e676099a9b55e5bd5e75ce7f5de3 (patch)
treeed161c10e4b5d103f15ceff0c0bc5b19f7cc7beb
parentc0ef86f082b41c6a53d61085845a5d55c5bc4a44 (diff)
downloadroundcubemail-plugins-kolab-17c19562cc26e676099a9b55e5bd5e75ce7f5de3.tar.gz
Reactivate fix for daylight saving differences between base event and recurring instance
-rw-r--r--plugins/calendar/lib/calendar_recurrence.php9
1 files changed, 6 insertions, 3 deletions
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;
}