small code shortening

This commit is contained in:
tibbi 2021-03-10 18:20:33 +01:00
parent 28de3c6eb8
commit ec955d0ef4
1 changed files with 2 additions and 1 deletions

View File

@ -256,7 +256,8 @@ class EventActivity : SimpleActivity() {
0
} else {
val original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(original).getOffset(System.currentTimeMillis())) / 1000L
val millis = System.currentTimeMillis()
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(millis) - DateTimeZone.forID(original).getOffset(millis)) / 1000L
}
val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset