From d54becb4465416d7c2c76e8c3987509fe15d89ce Mon Sep 17 00:00:00 2001 From: Dennis Dast Date: Sun, 15 Sep 2019 12:10:27 +0200 Subject: [PATCH] Always shift end date by one day for all-day events Shift the end date by one day when the start and end date are equal. Previously this was only done when the end date is already ahead of the start date. An event with equal start and end date is created when the start and end times are equal before switching to all-day. --- .../com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt index 5311ca232..6cbb5c435 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt @@ -409,7 +409,7 @@ class CalDAVHelper(val context: Context) { put(CalendarContract.Events.RRULE, repeatRule) } - if (event.getIsAllDay() && event.endTS > event.startTS) + if (event.getIsAllDay() && event.endTS >= event.startTS) event.endTS += DAY if (event.repeatInterval > 0) {