Closed mohamedmansour closed 6 years ago
This is going to be an interesting one. Perhaps we need to introduce a health state timer. More research is needed
I believe I found the culprit. Check out these lines:
I tried this in Chrome DevTools (on Windows 10):
(new Date()).toLocaleTimeString()
It showed current time. Then I changed the system time, and executed the above line again in Chrome DevTools. It didn't change immediately, though after 30 seconds, Chrome caught up with the system time.
I tried the same thing under Firefox, which immediately reflected system time changes.
This might be a Chrome issue, or it might be there by design. A little research shows a similar issue was reported back in 2010:
I found a major bug where the prayer badge time wasn't updating, I fixed it in here: cbd0cbe68dfdbe092ba039a54bbcdb41308f64d8
The time should always update in AlarmClock, there is another issue I noticed, trying to understand why he included nonPrayerTimesNames
in AlarmClock
I didn't implement that part, brother @alir1982 contributed that code 8 years ago :)
I believe this works!
I recall from old times that Prayer Times didn't respond to system time changes: For instance, when a user changes the system time, Prayer Times continued to use the old time until the browser is restarted. Other examples include when the system time changed due to observing daylight saving, or when the computer came back from the sleep/hibernate while the browser was open.
via @msdousti