From 37c86400d4dfc80138a9a8f6eefae0097e191a9e Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 9 Jan 2018 17:25:31 +0100 Subject: [PATCH] do not use withZoneRetainFields when parsing dates, should fix off-by-day --- .../kotlin/com/simplemobiletools/calendar/helpers/Parser.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Parser.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Parser.kt index 3a81ce0e0..990437a19 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Parser.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/Parser.kt @@ -83,7 +83,7 @@ class Parser { parseLongFormat(edited, value.endsWith("Z")) } else { val dateTimeFormat = DateTimeFormat.forPattern("yyyyMMdd") - dateTimeFormat.parseDateTime(edited).withZoneRetainFields(DateTimeZone.getDefault()).withHourOfDay(1).seconds() + dateTimeFormat.parseDateTime(edited).withHourOfDay(5).seconds() } }