Problem with daylight savings? [solved]

My logs are being filled with this error on 99.2. It appears to be daylight savings related. related. I was wondering if anyone has any thoughts on a cure:

Fri Oct 11 2019 23:01:55 GMT+1100 (Australian Eastern Daylight Time)
Error doing job: Exception in callback async_track_utc_time_change.<locals>.pattern_time_change_listener(<Event time_c....001606+11:00>) at /usr/src/homeassistant/homeassistant/helpers/
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/", line 88, in _run, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 411, in pattern_time_change_listener
  File "/usr/src/homeassistant/homeassistant/helpers/", line 395, in calculate_next
    localized_now, matching_seconds, matching_minutes, matching_hours
  File "/usr/src/homeassistant/homeassistant/util/", line 256, in find_next_time_expression_time
    raise ValueError("Cannot find a next time: Time expression never " "matches!")
ValueError: Cannot find a next time: Time expression never matches!

Have you rebooted since dst changed?

Yes. Several times. Still get spammed with the errors.

What is your timezone set to?

Sydney, Australia

Is this Raspbian or hassbian? Is that host set to Sydney DST as well as setting in home assistant?

I’m using on debian on a NUC in Sydney as well and no problem with TZ.

It’s hassio via a linux VM. Its creating havoc, uping my memory and cpu usage. Might have to try and reinstall a VM snap shot at this rate.

edit: Come to think of it, I did check that the VM changed time correctly after the DST change, but since then I have had a few power blackouts, and the VM are supposed to suspend and then re-sync time on restart. I didn’t check this, prior to currently re-installing a snapshot. See what happens after the snapshot recovery.

edit 2: Strange the error still persists on my ‘snapshots’? I have tried loading 3 different backups and allhave the same problem

What is the output of the date command in the VM.


Also what is the TZ environment variable

echo $TZ

Thanks Nick. It’s solved. It turns out it was nothing to do with the daylight savings time. The error which referred to ‘UTC time’ was confusing. I googled the exact error message and found something very similar to my issue which put me on the right path.

All but one of my automations are via Node Red. The one automation I made via the HA interface (not yaml) as a test many months ago, began to to cause the error recently. That’s why reinstating previous snapshots (from the last week or so) didn’t fix the issue. It was a time based automation that didn’t have ‘00’ in minutes and seconds populated just the hours - they were blank. While this worked (or didn’t throw errors) previously, I think my upgrade to .100 and subsequent down grade (due to ios app not connecting issues ) exposed this issue/problem and caused the flooding of errors to the log file. Putting the zero’s in the right fields fixed this immediately.

That was a fun waste of 3 hours - not. :smirk:

1 Like