Prevent system clock from going backward at startup
sudo fake-hwclock save|load [force]
| system clock to file with time later than |
fake-hwclock's release date.
force saves any time.
| Slew the system clock forward to the time in the file. |
force move the system clock backwards or forwards.
|file to store the time|
|init script |
run on startup and
fake-hwclock exits after save or load so invoking init script with
start does a
stop|reload|restart|force-reload actually issues a
|systemd service to run on |
startup and shutdown
|Settings file for the init script.|
/etc/default/fake-hwclock (Only comments)
|Cron job saves hourly|
For systems that may have power reset randomly it may be wise to add a root cron entry to save more frequently,
otherwise during startup the system it may be 59+ minutes slow until an ntp server can be contacted.
set the file used by fake-hwclock
> sudo fake-hwclock load
Current system time: 2021-10-06 17:46:43 UTC
fake-hwclock saved clock information is in the past: 2021-10-06 17:17:0
To set system time to this saved clock anyway, use "force"
$? = 0
invalid command 1
Permission denied 2