I'm coding an alarm clock application, and i would like to know what happens, when I set some alarm with AlarmManager for example at time 2:59am (this is not time of my alarm, this is only time WHEN i set some alarm), and at 3:00am there will be automatic time change from summer time to winter (DST). What happens with my scheduled alarm? I found nothing in docs, and it's not so easy to test, at least I must change dates and wait few hours...I'm not so patient ;)
Next problem - I was also curious, what happens with my alarms set with AlarmManager when user changes timezone. This was luckily pretty easy to test, and I found, that android is pretty "intelligent" and reschedule alarm automatically. So when in my timezone is for example 9:00 and i set alarm on 10:00, and switch timezone (+1 hours) where actual time is 10:00, android reschedule my alarm to 11:00, as expected. This is very fine, however, i didn't found also anything in docs...
Anybody has more official information? Thx
RTC
and RTC_WAKEUP
use System.currentTimeMillis()
as the timebase, which is in UTC time and therefore is independent of time zone changes, daylight savings time changes, etc.
Alarm will only depend on System time. Alarm will not be affected by day light savings, only the system time changes. Alarm will be according to the system time and whichever zone, dst the device is in (or will be in)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With