Date 18 months in the past without internet

I have a RPi3 running hass.io that has been working fine. But then my internet connection broke after a power outage a couple of days ago. After some reboots, Home Assistant is working fine, but I noticed my time-based automations weren’t working.

I logged on using ssh and ran the date command and noticed that it thought it was Juny 23, 2018 and a different time of day.

I’m surprised that it can’t even remember the dates between reboots without haing access to an ntp server. Is this really expected?

I tried setting the date/time manually using the date command, but it wouldn’t let me.

I guess I could try to make it talk to a local ntp server, also without internet connection, but that’s mostly a workaround.

A couple of related threads, but they’re note really describing the same issue:

Yes it is expected. The rpi does not have a RTC.

You can had a RTC on GPIO if you need it (look for DS3231 for example). Just note that HassOS has no support for RTC

So how does adding an RTC help in this case? I have an RPI with HA installed at a remote location which looses power often and has no internet. There is local WIFI and two other RPIs with RTCs. In theory I can remote SSH to one of the other RPIs to get the time, but the ‘date -s “time”’ is not permitted on the HA platform so I’m no further ahead.

Do a supervised install, then date will work, and ntp.