touchlab / DroidconKotlin

Kotlin Multiplatfom app for Droidcon Events
https://touchlab.co
Apache License 2.0
1.05k stars 82 forks source link

Schedule alarms in the device's own timezone #150

Closed psh closed 3 years ago

psh commented 3 years ago

Given a session that started at 11:10am that lasts 30 minutes and my device was in Central European Time (2 hours ahead of GMT).

Before this change, alarm scheduling was scheduling for 11:10 UTC which the system saw as being 1:10pm and the alarms were therefore set for

Alarm time: Wed Oct 20 13:00:00 GMT+02:00 2021
Alarm time: Wed Oct 20 13:40:00 GMT+02:00 2021

This change pushes the start and end Instant into device time before scheduling so that the notifications appear when expected.