Wrong Time/Date in Core & Supervisor

I have completely wrong dates and times in HA.

Home Assistant thinks it is February 2nd, where it is June 13th. The following template
{{as_local(states.sensor.time.last_updated).strftime('%A %d.%m.%Y %H:%M')}}
returns
image

Last updated shows 19 weeks ago when toggle the boolean or start the timer:
image

Supervisor (and core) logs are yesterday, time is off.

21-06-12 20:36:17 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-06-12 20:36:17 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-06-12 20:36:17 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-06-12 20:36:17 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-06-12 20:36:17 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-06-12 20:36:18 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-06-12 20:36:18 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-06-12 20:36:18 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-06-12 20:39:05 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
21-06-12 20:44:40 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-06-12 21:11:01 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-06-12 21:14:50 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

Rebooted several times, no change.
Changed Configuration/General Conifg/Time Zone to different location and back, no change.

I was playing around with automations and blueprints before this happend.

Any ideas?

Core log
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2021-06-11 23:10:16 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-11 23:10:16 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration rki_covid which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-11 23:10:37 WARNING (MainThread) [homeassistant.setup] Setup of rki_covid is taking over 10 seconds.
2021-06-11 23:10:37 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2021-06-11 23:10:37 WARNING (MainThread) [homeassistant.components.scene] Setup of scene platform homeassistant is taking over 10 seconds.
2021-06-11 23:10:37 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2021-06-11 23:10:38 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
2021-06-11 23:10:49 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform adguard is taking over 10 seconds.
2021-06-11 23:10:51 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for None (192.168.88.34): Error connecting to ('192.168.88.34', 6053): [Errno 113] Connect call failed ('192.168.88.34', 6053)
2021-06-11 23:10:55 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for None (192.168.88.19): Error connecting to ('192.168.88.19', 6053): [Errno 113] Connect call failed ('192.168.88.19', 6053)
2021-06-11 23:10:55 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for None (192.168.88.13): Error connecting to ('192.168.88.13', 6053): [Errno 113] Connect call failed ('192.168.88.13', 6053)
2021-06-11 23:10:55 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for None (192.168.88.18): Error connecting to ('192.168.88.18', 6053): [Errno 113] Connect call failed ('192.168.88.18', 6053)
2021-06-11 23:12:31 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID tuyasteckdose1switchgosund_plug_1 already exists - ignoring switch.gosund_plug_1
2021-06-11 23:12:31 ERROR (MainThread) [homeassistant.components.sensor] Platform esphome does not generate unique IDs. ID tuyasteckdose1sensorgosund_plug_1_voltage already exists - ignoring sensor.gosund_plug_1_voltage
2021-06-11 23:12:31 ERROR (MainThread) [homeassistant.components.sensor] Platform esphome does not generate unique IDs. ID tuyasteckdose1sensorgosund_plug_1_current already exists - ignoring sensor.gosund_plug_1_current
2021-06-11 23:12:31 ERROR (MainThread) [homeassistant.components.sensor] Platform esphome does not generate unique IDs. ID tuyasteckdose1sensorgosund_plug_1_wattage already exists - ignoring sensor.gosund_plug_1_wattage
2021-06-11 23:12:31 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform esphome does not generate unique IDs. ID tuyasteckdose1binary_sensorgosund_plug_1_power_button already exists - ignoring binary_sensor.gosund_plug_1_power_button
2021-06-12 00:05:35 ERROR (Thread-24) [homeassistant.helpers.template] Template variable error: 'trigger' is undefined when rendering '{## Imitate available variables: ##}
...
2021-06-12 18:44:18 ERROR (MainThread) [frontend.js.latest.202106030] :0:0 Script error.
2021-06-12 21:37:59 WARNING (MainThread) [homeassistant.components.fan] The fan.set_speed service is deprecated, use fan.set_percentage or fan.set_preset_mode instead

If the time is wrong it can’t access the ntp internet server

Have you tried rebooting the system? That may be an easy fix.

Do you know which NTP address HA tries to access?

I did, several times.

I guess it is time.cloudflare.com, was blocked by the AdGuard addon

1 Like

I thought it used the google one……

I see this on GitHub

NTP
You can manual edit the systemd timesync file on /etc/systemd/timesyncd.conf.

Our default NTP configuration look like:

[Time]
NTP=time1.google.com time2.google.com time3.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org

https://github.com/home-assistant/operating-system/blob/582ec82f83cb157176e0b31c3eb3154c31c29ca8/Documentation/configuration.md

Did you solve this??
I have a similar issue. Since OS update 6.3 my Pi4 is stuck on 2021-08-31 and time: 11:03 everytime I reboot the host.
DNS is working and I have checked all sorts of settings. I have no idea from where it is pulling that date/time.
I am a total loss since restoring a snapshot (backup) will not make a difference.

That would be the time of the last shutdown with a connection to a NTP server.