From c03c2c189992db3eb0ba31091859e01249625f0f Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Thu, 3 Nov 2022 12:50:17 +0100 Subject: [PATCH] updating the comments --- .../com/simplemobiletools/calendar/pro/extensions/Event.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Event.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Event.kt index d69789877..e9d2c8847 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Event.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Event.kt @@ -5,7 +5,7 @@ import com.simplemobiletools.calendar.pro.helpers.TWELVE_HOURS import com.simplemobiletools.calendar.pro.models.Event import org.joda.time.DateTimeZone -/** Shifts all-day events to local timezone such that the event starts and ends on the same time as in UTC */ +// shifts all-day events to local timezone such that the event starts and ends on the same time as in UTC fun Event.toLocalAllDayEvent() { require(this.getIsAllDay()) { "Must be an all day event!" } @@ -17,13 +17,14 @@ fun Event.toLocalAllDayEvent() { } } -/** Shifts all-day events to UTC such that the event starts on the same time in UTC too */ +// shifts all-day events to UTC such that the event starts on the same time in UTC too fun Event.toUtcAllDayEvent() { require(getIsAllDay()) { "Must be an all day event!" } if (endTS >= startTS) { endTS += TWELVE_HOURS } + timeZone = DateTimeZone.UTC.id startTS = Formatter.getShiftedUtcTS(startTS) endTS = Formatter.getShiftedUtcTS(endTS)