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 caf93d3e94
commit a088714955

View file

@ -588,8 +588,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)