mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fixing an illegal offset exception caused by daylight savings
This commit is contained in:
@@ -1100,6 +1100,7 @@ class EventActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun timeSet(hours: Int, minutes: Int, isStart: Boolean) {
|
||||
try {
|
||||
if (isStart) {
|
||||
val diff = mEventEndDateTime.seconds() - mEventStartDateTime.seconds()
|
||||
|
||||
@@ -1112,6 +1113,10 @@ class EventActivity : SimpleActivity() {
|
||||
mEventEndDateTime = mEventEndDateTime.withHourOfDay(hours).withMinuteOfHour(minutes)
|
||||
updateEndTimeText()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
timeSet(hours + 1, minutes, isStart)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkRepeatRule() {
|
||||
|
Reference in New Issue
Block a user