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 37dd4eb42..c3433ce39 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 @@ -435,6 +435,13 @@ class CalDAVHelper(val context: Context) { put(Events.RRULE, repeatRule) } + if (event.getIsAllDay()) { + event.toUtcAllDayEvent() + put(Events.ALL_DAY, 1) + } else { + put(Events.ALL_DAY, 0) + } + val parentEventId = event.parentId if (parentEventId != 0L) { val parentEvent = context.eventsDB.getEventWithId(parentEventId) ?: return@apply @@ -454,13 +461,6 @@ class CalDAVHelper(val context: Context) { } } - if (event.getIsAllDay()) { - event.toUtcAllDayEvent() - put(Events.ALL_DAY, 1) - } else { - put(Events.ALL_DAY, 0) - } - put(Events.DTSTART, event.startTS * 1000L) put(Events.EVENT_TIMEZONE, event.getTimeZoneString()) if (event.repeatInterval > 0) {