mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-05 12:58:17 +01:00
adding a crashfix at getting the device time zone
This commit is contained in:
parent
def5cf6147
commit
4008072ed5
@ -915,7 +915,8 @@ class EventActivity : SimpleActivity() {
|
||||
val offset = if (!config.allowChangingTimeZones || mEvent.getTimeZoneString().equals(mOriginalTimeZone, true)) {
|
||||
0
|
||||
} else {
|
||||
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(mOriginalTimeZone).getOffset(System.currentTimeMillis())) / 1000L
|
||||
var original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone
|
||||
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(original).getOffset(System.currentTimeMillis())) / 1000L
|
||||
}
|
||||
|
||||
val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset
|
||||
|
Loading…
Reference in New Issue
Block a user