summaryrefslogtreecommitdiff
path: root/plugins/calendar/lib
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/calendar/lib')
-rw-r--r--plugins/calendar/lib/Horde_Date_Recurrence.php5
-rw-r--r--plugins/calendar/lib/calendar_recurrence.php12
2 files changed, 7 insertions, 10 deletions
diff --git a/plugins/calendar/lib/Horde_Date_Recurrence.php b/plugins/calendar/lib/Horde_Date_Recurrence.php
index 68340ba..d6debf3 100644
--- a/plugins/calendar/lib/Horde_Date_Recurrence.php
+++ b/plugins/calendar/lib/Horde_Date_Recurrence.php
@@ -6307,7 +6307,10 @@ class Horde_Date_Recurrence {
'%04d%02d%02d');
$this->setRecurEnd(new Horde_Date(array('year' => $year,
'month' => $month,
- 'mday' => $mday)));
+ 'mday' => $mday,
+ 'hour' => 23,
+ 'min' => 59,
+ 'sec' => 59)));
}
if (isset($rdata['COUNT'])) {
$this->setRecurCount($rdata['COUNT']);
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;
}