appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Reschedule on daylight saving time change?

Open electrofloat opened this issue 4 years ago • 6 comments

Hi!

Do we need to reschedule all the schedules manually (aka restart appdaemon) when DST changes, or should this happen automatically?

We just had a DST change and all the schedules were off by 1 hour.

electrofloat avatar Mar 30 '20 08:03 electrofloat

This is a known issue and is currently being worked on in dev and will be in the next version. For now, the workaround is to restart AD after the change.

acockburn avatar Mar 30 '20 11:03 acockburn

is this still an issue? the docs at https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html#plugin-reloads seem to indicate that appdaemon will reload if DST changes...

adamcohenrose avatar Oct 27 '20 10:10 adamcohenrose

I'm not using schedules at the moment, so I cannot test it unfortunately. But feel free to close this if it is implemented and works now.

electrofloat avatar Oct 27 '20 17:10 electrofloat

for me most of it did work except the run_daily schedules. they were still off for 1 hour.

ReneTode avatar Oct 28 '20 01:10 ReneTode

That issue should have been fixed in the last release. So now, no restart for a DST change, and the time stamps for run daily etc. should be rewritten to conpensate.

acockburn avatar Oct 28 '20 10:10 acockburn

im on 4.0.6 (dev after the last release.)

i got the message that DST was detected. time was changed, and most things did run as expected. but the run_daily scheduled things did run on the summer time, and not on the new time (and i could see in the AI that they were on the wrong time)

ReneTode avatar Oct 29 '20 00:10 ReneTode

This appears to still be an issue. We changed DST today, and a run_daily automation didn't run. There was no indication of errors or restarting apps in the logs.

deviantintegral avatar Nov 06 '22 12:11 deviantintegral

There are too many corner cases to actually get this to work reliably all the time and the code is very complex. My thought is to revert to the old system which just restarts the apps when the time changes and let the app take care of it. That upset some users with multiple apps but it’s more deterministic than trying to rewrite existing scheduler entries.

acockburn avatar Nov 06 '22 13:11 acockburn

Could there be a config option to opt out of the restart behaviour system wide, or per app?

Another thought is that Home Assistant seems to handle this fine, so there may be some code offering ideas on how to architect this.

deviantintegral avatar Nov 06 '22 16:11 deviantintegral

Duplicate of #1485 - will be tracked there.

acockburn avatar Mar 04 '23 13:03 acockburn