From 622b927764083bee7bbf5a400a9060c4874152d9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 12 Jun 2017 12:33:33 +0200 Subject: [PATCH] remove duration check of 86400, as it fails over daylight saving changes and more then one day --- calendar/inc/class.calendar_ical.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 78ca6b75d7..564b64eac3 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -605,7 +605,7 @@ class calendar_ical extends calendar_boupdate if ($tzid == 'UTC' && $event['end'] - $event['start'] <= 86400) $attributes['duration'] = $event['end'] - $event['start']; else - $attributes['DTEND'] = self::getDateTime($event['end'],$tzid,$parameters['DTEND']); + $attributes['DTEND'] = self::getDateTime($event['end'],$tzid,$parameters['DTEND']); } else { @@ -2417,9 +2417,7 @@ class calendar_ical extends calendar_boupdate // No reference or RECURRENCE-ID for the series master $event['reference'] = $event['recurrence'] = 0; } - if (Api\DateTime::to($event['start'], 'H:i:s') == '00:00:00' && Api\DateTime::to($event['end'], 'H:i:s') == '00:00:00' - && $event['end'] - $event['start'] == 86400 - ) + if (Api\DateTime::to($event['start'], 'H:i:s') == '00:00:00' && Api\DateTime::to($event['end'], 'H:i:s') == '00:00:00') { // 'All day' event that ends at midnight the next day, avoid that $event['end']--;