Entity 'changed' time displays using local clock

Something that I’ve always found odd with HA is that the ‘changed’ time for an entity seems to use the clock from the client, not the server, so if there is any time drift between devices then it looks really weird from a user perspective… you change state for an entity and it says ‘in xx seconds’ which counts down, changes to ‘now’ then start to count up, ‘xx seconds ago’…

Does anyone else experience this? - I seem to remember it ever since first using HA about 4 years back, and it seems odd this was never ‘fixed’… it seems like the client should be aware of the server clock and compensate against it’s own clock, but it seems that there is probably a ‘changed’ timestamp for the entity that is just referenced against the clients clock.

This is what i’m talking about:
Screenshot 2022-04-22 115746

I’ve never seen that and I’m pretty sure Home Assistant marks the time changed using it’s own time (a lot of devices are not time aware). Not sure why you are seeing that.

Interesting if that’s the case I’d love to know why it does this (and how to stop it) - like I said, it’s always been like this since I started using HA about 4 years ago :stuck_out_tongue_winking_eye:
Edit - Out of interest I ran date on my HA server and compared it to the local clock on my PC… sure enough, there is about 10 seconds difference (server is ahead of my PC), which is what I see when I change an entity state (eg turn off a light) - it will initially display ‘in 10 seconds’, that seems to back up the theory that HA is stamping the ‘change’ time, but the browser (Chrome in this case) renders that against the local clock.

Oh, yeah that’s what it is. The web browser always shows local times. It’s even more annoying when you are in a different time zone.

Vote here: Home timezone display in browser

Thanks voted!
I’m surprised not more people have noticed this, as surely clock drift between devices is common, and it seems really clunky when you switch a light and the UI tells you it’s turning on 10 seconds in the future :rofl:

Set up NTP clock syncing on the device(s) running the web browser(s).

It’s a Windows 11 PC already set up to use ‘time automatically’ - however I just went to settings and hit ‘sync now’ and it jumped 10s to the correct time :man_facepalming:

It will be interesting to see how long it lasts before it drifts out :stuck_out_tongue: