Hassio have a wrong date

I’ve already check other topic, like My Hass.io have wrong date but with no success

I have an hassio

Core Versione core-2021.8.8

Supervisor Versione supervisor-2021.06.8

Home Assistant OS 6.5

via ssh i try date command and i get
Fri Jun 25 14:50:54 CEST 2021
(now is, on my time zone, November 11th, 22:44)

I read on ohter topic to be sure that hassio can connect to a NTP server. I suppose it can, because it 's correctly connected to internet ( can pig without problem, for example, pool.ntp.org)

I suppose my ISP doesn’t block the udp 123 port, neither my router, because on my windows pc on the same lan if I use the command w32tm /monitor /computers:pool.ntp.org i get what i suppose a good ouput

pool.ntp.org[184.105.182.16:123]:
    ICMP: 198ms ritardo
    NTP: -0.7915331s differenza di tempo dall'orologio locale
        RefID: clock.sjc.he.net [216.218.254.202]
        Strato: 2

so now what i can do?
I have to correct the time because i have many problem (for example i can’t update)

what hardware are you running on?
Raspberry PI’s do not have a hardware clock, so they need to update from a NTP source before the clock can be trusted.
If you are running a Raspbian OS, then this should happend automatically.

Raspberry Pi
So now what I have to do?

If you are using Raspbian OS, then just wait a few minutes and it should be correct.
If you are using another OS, then you need to configure a NTP client.

He is not running RaspberriPi OS, but HA OS. An NTP-client is built in.

Try setting the time correct using a SSH shell.

or install chrony:

image

Normally on latest HAssos releases, it check the NTP time on boot and wait for a sync… I believe this was introduced somewhere in 6.2

@francisp Which command via SSH to set the correct time?

I reboot many time, the problem remain

date -s "12 NOV 2021 07:33:00"

Each time you reboot it sort of restart the process. You need to let it run instead.

@WallyR I already let it run for many our, with no results

@francisp
thanks so much
i will try this evening at home (whit this problem i can’t even connect with nabu casa), but i’m afraid it will not work, i read elsewhere that this command does not work on hassio, but i will try and let you know

You can always try this:

it does not work, with your command i get
date invalid
i tryed this command:
date -s "2021-11-13 10:35:00"
but, as i was supposing, i get a
date: can't set date: Operation not permitted

and sudo date -s "2021-11-13 10:35:00"

so stupid, i didn’t use it sudo
but meanwhile i tried this one,

with the usb CONFIG file, with the default NTP configuration plus my fritzbox router as a local NTP server, and now the time is correct

thanks so much for help

PS: how do i include the post as you did it instead of using a normal link?

Put it on a new line.

thanks again

meanwhile i’m trying to update hassio via the supervisor, and now it’s looks to work

but in your opinion, why i got this problem? Why my hassio lost the correct time ?

You might have changed someting on your router.
NTP is using the NTP protocol which is based on UDP and if you use a NTP pool, then replies are not limited to only one source IP and that often confuse a standard configured NAT/Firewall.

I had the exact same problem with the success of new installations not completing on new disks. The log (browser) had a completely wrong date and time. At first I suspected DNS and therefore took out the pi-hole as DNS server. But that did not help. Then I read that for NTP also the UDP protocol is needed and that was then the error: in my Fritzbox new devices may only ‘surf and mail’. After I deleted this restriction for the new Raspberry, everything worked!