Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Alarm Times Being Weird #25

Closed
fennifith opened this issue Nov 13, 2018 · 3 comments
Closed

Alarm Times Being Weird #25

fennifith opened this issue Nov 13, 2018 · 3 comments
Labels
Projects

Comments

@fennifith
Copy link
Owner

I put off creating this for a while, as it's a little weird to reproduce, but I have managed to get it to happen on multiple occasions now, warranting an issue. I am not sure why any of this happens. It is weird.

  1. Start the app.
  2. Create an alarm, set for ex. 07:30 (24-hour time, though it shouldn't make a difference)
  3. Look at the created alarm. It is set to 07:30.
  4. Close the app (force-stop if necessary)
  5. Start the app.
  6. Look at the created alarm. It is set to 19:00. Wth.

I have also noticed a few weird discrepancies with repeating alarms ringing on the wrong day / not ringing on the right day. This may be caused by the same issue. I hope it is. Otherwise I need to create another issue.

@fennifith
Copy link
Owner Author

Well. That was a silly issue. Going to leave this open for a few more days while I try to figure out if there's anything else wrong.

@fennifith
Copy link
Owner Author

My alarm didn't wake me up this morning.

@fennifith
Copy link
Owner Author

I'VE FOUND THE PROBLEM!

In AlarmData.getNext, when repeat is enabled, it always assumes that the next time the alarm will ring is the day after the current one - so if it were to be invoked on the day of the alarm, it would return the next (repeating) time it's scheduled to ring after the current day. To fix, I might have to set int day to something like (now.get(Calendar.DAY_OF_WEEK) + i - 1) % 7 so that the current day is also checked, or just rewrite the whole function to make it more readable.

fennifith added a commit that referenced this issue Feb 12, 2019
@fennifith fennifith added this to Done in Roadmap Feb 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Roadmap
  
Done
Development

No branches or pull requests

1 participant