Chronyc config is bad if device comes online without internet

Hi Adam, thanks for the details about your use case. Time synchronization with and without an RTC is a critical feature for BalenaOS and we are working on improving the way time is handled.

Recent releases already address the problem chrony was having to update the last timestamp. We have replaced this chrony functionality with a fake.hwclock service, see systemd/timeinit: add fake.hwclock to maintain system time over reboots · balena-os/meta-balena@96c2c49 · GitHub. This change is available since 2.60.

About the NTP servers, by default BalenaOS uses a pool of servers provided by ntp.org which are already distributed (see pool.ntp.org: the internet cluster of ntp servers). However, you can customize your own NTP server list if you prefer, see Configuration - Balena Documentation for details.

You mention querying the OS time sync service to check is time was synchronized and manually do a time sync- however this should not be needed if the time sync service was working properly and we are actively working on making that happen.

We are still working on ways to improve the time synchronization and looking for example to alternatives to NTP when it is not available, see systemd/timeinit: add HTTPS time synchronisation service by markcorbinuk · Pull Request #2074 · balena-os/meta-balena · GitHub.

However I believe that a recent BalenaOS will probably solve your time synchronization problems.