Calendar - fix bug in recurring event exception edit across timezones causing events to move or get lost

This commit is contained in:
nathangray 2017-07-31 12:39:15 -06:00 committed by Ralf Becker
parent 7abf1bf5c8
commit 9bf934d1f5

View File

@ -1181,7 +1181,7 @@ class calendar_boupdate extends calendar_bo
if (!isset($event['whole_day'])) $event['whole_day'] = $this->isWholeDay($event); if (!isset($event['whole_day'])) $event['whole_day'] = $this->isWholeDay($event);
// set recur-enddate/range-end to real end-date of last recurrence // set recur-enddate/range-end to real end-date of last recurrence
if ($event['recur_type'] != MCAL_RECUR_NONE && $event['recur_enddate']) if ($event['recur_type'] != MCAL_RECUR_NONE && $event['recur_enddate'] && $event['start'])
{ {
$event['recur_enddate'] = new Api\DateTime($event['recur_enddate'], calendar_timezones::DateTimeZone($event['tzid'])); $event['recur_enddate'] = new Api\DateTime($event['recur_enddate'], calendar_timezones::DateTimeZone($event['tzid']));
$event['recur_enddate']->setTime(23,59,59); $event['recur_enddate']->setTime(23,59,59);