diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt index d79e29187..13321138a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -354,8 +354,8 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { return } - val newStartTS = mEventStartDateTime.seconds() - val newEndTS = mEventEndDateTime.seconds() + val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() + val newEndTS = mEventEndDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() if (newStartTS > newEndTS) { toast(R.string.end_before_start) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt index feca56beb..5506c945d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt @@ -518,8 +518,6 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont val flags = cursor.getIntValue(COL_FLAGS) val repeatLimit = cursor.getIntValue(COL_REPEAT_LIMIT) val eventType = cursor.getIntValue(COL_EVENT_TYPE) - if (flags and FLAG_ALL_DAY != 0) - endTS -= 1 val ignoreEventOccurrences = if (repeatInterval != 0) { getIgnoredOccurrences(id)