summaryrefslogtreecommitdiff
path: root/plugins/calendar/lib/calendar_recurrence.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/calendar/lib/calendar_recurrence.php')
-rw-r--r--plugins/calendar/lib/calendar_recurrence.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/calendar/lib/calendar_recurrence.php b/plugins/calendar/lib/calendar_recurrence.php
index ce1738b..51a0fdd 100644
--- a/plugins/calendar/lib/calendar_recurrence.php
+++ b/plugins/calendar/lib/calendar_recurrence.php
@@ -53,14 +53,8 @@ class calendar_recurrence
// TODO: replace with something that has less than 6'000 lines of code
require_once($this->cal->home . '/lib/Horde_Date_Recurrence.php');
- // shift until date by one day in order to trick the Horde_Date_Recurrence computation
- if ($event['recurrence']['UNTIL']) {
- $event['recurrence']['UNTIL'] = clone $event['recurrence']['UNTIL'];
- $event['recurrence']['UNTIL']->modify('+1 day');
- }
-
$this->event = $event;
- $this->engine = new Horde_Date_Recurrence($dtstart->format('U'));
+ $this->engine = new Horde_Date_Recurrence($dtstart->format('Y-m-d H:i:s'));
$this->engine->fromRRule20(calendar::to_rrule($event['recurrence']));
if (is_array($event['recurrence']['EXDATE'])) {
@@ -69,7 +63,7 @@ class calendar_recurrence
}
$this->tz_offset = $event['allday'] ? $this->cal->gmt_offset - date('Z') : 0;
- $this->next = new Horde_Date($dtstart->format('U'));
+ $this->next = new Horde_Date($dtstart->format('Y-m-d H:i:s'));
$this->hour = $this->next->hour;
}
@@ -87,7 +81,7 @@ class calendar_recurrence
$next->hour = $this->hour;
$next->min = 0;
}
- $time = new DateTime($next->iso8601DateTime(), $this->cal->user_timezone);
+ $time = new DateTime($next->rfc3339DateTime(), $this->cal->user_timezone);
$this->next = $next;
}