From e29b79db9f4b9b766950d720fc7c0e8453a83744 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 4 May 2018 13:43:37 +0200 Subject: [PATCH] fix #470, properly fill out start and end timestamp of cancelled repeatable event instances --- .../com/simplemobiletools/calendar/helpers/CalDAVHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt index b812d5b26..280535589 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt @@ -416,8 +416,8 @@ class CalDAVHandler(val context: Context) { private fun fillEventRepeatExceptionValues(event: Event, occurrenceTS: Int): ContentValues { return ContentValues().apply { put(CalendarContract.Events.CALENDAR_ID, event.getCalDAVCalendarId()) - put(CalendarContract.Events.DTSTART, 0) - put(CalendarContract.Events.DTEND, 0) + put(CalendarContract.Events.DTSTART, occurrenceTS) + put(CalendarContract.Events.DTEND, occurrenceTS + (event.endTS - event.startTS)) put(CalendarContract.Events.ORIGINAL_ID, event.getCalDAVEventId()) put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().toString()) put(CalendarContract.Events.ORIGINAL_INSTANCE_TIME, occurrenceTS * 1000L)