T1385: Fix importing events with no DTEND and no DURATION

Per RFC5545 3.6.1 it is perfectly valid. In such cases DTEND should set to DTSTART.
This commit is contained in:
Aleksander Machniak 2016-07-29 06:54:48 -04:00
parent 2056b92c39
commit daefd52a92

View file

@ -591,8 +591,8 @@ class libvcalendar implements Iterator
$event['allday'] = true;
}
// all-day events may lack the DTEND property
if ($event['allday'] && empty($event['end'])) {
// events may lack the DTEND property, set it to DTSTART (RFC5545 3.6.1)
if (empty($event['end'])) {
$event['end'] = clone $event['start'];
}
// shift end-date by one day (except Thunderbird)