From a08871495516de1281b656d839132da499de041c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 29 Jul 2016 06:54:48 -0400 Subject: [PATCH] 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. --- plugins/libcalendaring/libvcalendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php index 515ca054..b63cffb4 100644 --- a/plugins/libcalendaring/libvcalendar.php +++ b/plugins/libcalendaring/libvcalendar.php @@ -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)