Alarm doesn't consider change to summertime
Steps to reproduce
Set alarm in the night of a timechange (1 am on march 31) to 8 am.
Expected behavior
Alarm should ring at 8 am.
Actual behavior
Alarm will ring at 9 am.
Clock You version
7.1 (15)
Android version
GrapheneOS Android 14 Buildnumber 2024032100
Other details
No response
Acknowledgements
- [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
- [X] I have written a short but informative title.
- [X] I will fill out all of the requested information in this form.
Confirmed on Android 10. Priority may be low as this should not reproduce for 6 months until the next time change; however it is fairly critical as it lowers confidence in the app. What is I had a train/plane to catch after the time change. Thanks
The point of attack is somewhere between TimeHelper.currentTime and AlarmHelper.getAlarmTime(). Java.util.calendar should handle DSTs, given that the default timezone and current date are set correctly. When enqueuing the alarm pre-DST-flip the calendar-instance should account for the difference automatically, but does not. Would be interesting to check the properties of the calendar object in a debugger.
https://github.com/you-apps/ClockYou/commit/a99972f6b8b13e21a54df418eea1b39e0d582342