remove duration check of 86400, as it fails over daylight saving changes and more then one day

This commit is contained in:
Ralf Becker 2017-06-12 12:33:33 +02:00
parent d779e63027
commit 622b927764

View File

@ -605,7 +605,7 @@ class calendar_ical extends calendar_boupdate
if ($tzid == 'UTC' && $event['end'] - $event['start'] <= 86400) if ($tzid == 'UTC' && $event['end'] - $event['start'] <= 86400)
$attributes['duration'] = $event['end'] - $event['start']; $attributes['duration'] = $event['end'] - $event['start'];
else else
$attributes['DTEND'] = self::getDateTime($event['end'],$tzid,$parameters['DTEND']); $attributes['DTEND'] = self::getDateTime($event['end'],$tzid,$parameters['DTEND']);
} }
else else
{ {
@ -2417,9 +2417,7 @@ class calendar_ical extends calendar_boupdate
// No reference or RECURRENCE-ID for the series master // No reference or RECURRENCE-ID for the series master
$event['reference'] = $event['recurrence'] = 0; $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' 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
)
{ {
// 'All day' event that ends at midnight the next day, avoid that // 'All day' event that ends at midnight the next day, avoid that
$event['end']--; $event['end']--;