Calendar - Fix 1 day holidays with duration specified as P1D spanning 2 days

This commit is contained in:
nathangray 2017-06-09 15:28:06 -06:00
parent 423caf7be2
commit bd8dd18b12

View File

@ -2417,6 +2417,13 @@ 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
)
{
// 'All day' event that ends at midnight the next day, avoid that
$event['end']--;
}
// handle the alarms
$alarms = $event['alarm'];