Had set up a home-assistant based on raspbian + python.
Raspbian can update date time now by setting my router as its ntp time server.
I will try to resolve my problem on hass.io later.
I would check your config.json file to see what you have set for your NTP servers (should be the default). Also try to ping them from your network to ensure you can reach them. If not make sure your have port 123 open.
I know this thread is old but I had the same issue and wanted to share what fixed it for me as I didn’t see this solution spelled out anywhere else. My system time was correct, and the latitude/longitude/elevation was all manually set correctly in my config file. Still the sun component was 6.5 hours off from my actual sunrise/sunset times. On my samba share I went into the .storage folder and opened core.config in a text editor. The latitude and longitude here was incorrect. I ended up renaming this file core.config_backup, and restarted home assistant. I thought the system might recreate this file but it hasn’t. However now it appears the sun component is using the latitude/longitude/elevation set in my configuration.yaml. My sun component shows sunset is going to be at 8:47PM instead of the previous 2:17 PM
I know it’s an old thread, but I’m facing similar issue. My Hassio server date is 4 days and one and half hour back. Found core.config file, but everything is as same as configuration.yaml specifications and same location.
May I know how can I find config.json file from hassio?
I know it’s frustrating, but after tried everything (logs, configs, too many reboots of server and host) apparently It was resolved itself. Still don’t know the root cause for this issue and don’t know how did I resolved.
You can find the steps I’ve taken in the process of resolution here.
Hi, i’m having a similar problem, when i restart hassio the datetime is wrong, all automations are not working correctly and it’s imposible to connect by nuba. There are some service that my router block but i don’t know what it is because when i connect the hassio in a friend router, it works correctly. I checked the port 123 and it 's working. it’s frustrating. If i want to update i have to go to my friend house.
~ $ date
Sun May 30 14:21:43 CEST 2021
~ $ date -s 05301427
date: can’t set date: Operation not permitted
Sun May 30 14:27:00 CEST 2021
~ $ date
Sun May 30 14:22:01 CEST 2021
~ $ id
uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
Same issue here, not being able to find a way to set the datetime correctly (I can set the time via ssh with date -s 00:00:00, not the complete date…).
Also I’m a bit surprised the hardware did not keep the datetime after being off during a couple of days… is that the normal behavior? I’m using the odroid blue edition… which already gave problems with the installation because of this datetime problem due to a certificate, and now I see this.
Also a suggestion for the HA developers, probably it’s a good thing to show the system date-time, not just the zone where you’re in, just to make sure datetime from HA is aligned with what the user is asuming.
As far as the hardware date wrong, it was a HA OS issue for me. I spent hours trying to troubleshoot and the only way for me to resolve it was to backup, fresh install and restore. It was a year ago and it has been perfect since.
About fresh install, I think on my case would not help, I had the same issue after reinstalling several times, I think it’s a hardware problem… I’m using the HA-blue… what a surprise is so little supported