vicolo-dev / chrono

A modern and powerful clock, alarms, timer and stopwatch app for Android!
GNU General Public License v3.0
382 stars 17 forks source link

Alarms set for a specific date will go off 1 day early #340

Open porotoman99 opened 6 hours ago

porotoman99 commented 6 hours ago

Describe the bug When setting an alarm for a specific date, the actual date is set for one day earlier than what was selected.

To Reproduce Steps to reproduce the behavior:

  1. Go to "Alarms"
  2. Press the plus to add a new alarm
  3. Press "Customize"
  4. Press "Type"
  5. Press "On Specific Dates"
  6. Press "Dates"
  7. Select any one date (I chose the day 2 days from now)
  8. Press "Save"
  9. Press "Save"
  10. Notice the notification says "Alarm will ring in 1 day" when choosing a date 2 days in the future
  11. Close and reopen the app
  12. Notice the date displayed on the alarm has changed to 1 day earlier than what was originally displayed

Expected behavior When setting an alarm for September 22, I expect the alarm to go off on September 22 rather than September 21

Smartphone Information

porotoman99 commented 5 hours ago

After some more testing, it looks like the alarm will activate at the correct time as long as the app is not restarted. This means that if the app is restarted more than 1 day before the alarm was originally set to activate, it will activate 1 day early. If the app is restarted less than 1 day before the alarm was originally set to activate, it will turn itself off and never activate. Additionally, if the view is switched away from the "Alarm" menu, the displayed date will change to 1 day earlier, but it will not affect the time the alarm will activate unless the app is restarted.