summaryrefslogtreecommitdiff
path: root/plugins/calendar/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/calendar/drivers')
-rw-r--r--plugins/calendar/drivers/kolab/kolab_calendar.php4
-rw-r--r--plugins/calendar/drivers/kolab/kolab_driver.php5
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php
index b7a1bc8..84f7dca 100644
--- a/plugins/calendar/drivers/kolab/kolab_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_calendar.php
@@ -532,8 +532,8 @@ class kolab_calendar
if ($recurrence['range-type'] == 'number')
$rrule['COUNT'] = intval($recurrence['range']);
else if ($recurrence['range-type'] == 'date') {
- $rrule['UNTIL'] = new DateTime('@'.$recurrence['range']);
- $rrule['UNTIL']->setTimezone($this->cal->user_timezone);
+ $rrule['UNTIL'] = new DateTime('@' . $recurrence['range']);
+ $rrule['UNTIL']->setTimezone(new DateTimeZone(date_default_timezone_get()));
}
if ($recurrence['day']) {
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index e470fe2..55b08a1 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -498,7 +498,7 @@ class kolab_driver extends calendar_driver
// removing the first instance => just move to next occurence
if ($master['id'] == $event['id']) {
- $recurring = reset($storage->_get_recurring_events($event, $event['start'], $event['end'] + 86400 * 370, $event['id'].'-1'));
+ $recurring = reset($storage->_get_recurring_events($event, $event['start']->format('U'), $event['end']->format('U') + 86400 * 370, $event['id'].'-1'));
$master['start'] = $recurring['start'];
$master['end'] = $recurring['end'];
if ($master['recurrence']['COUNT'])
@@ -515,7 +515,8 @@ class kolab_driver extends calendar_driver
$_SESSION['calendar_restore_event_data'] = $master;
// set until-date on master event
- $master['recurrence']['UNTIL'] = $event['start'] - 86400;
+ $master['recurrence']['UNTIL'] = clone $event['start'];
+ $master['recurrence']['UNTIL']->modify('-1 day');
unset($master['recurrence']['COUNT']);
$success = $storage->update_event($master);
break;