RTC
The Pigeon RB700 has a real-time clock (RTC) with a backup battery (CR2032). When the system starts, it retrieves the time from the RTC if the system clock update fails via NTP.
Useful commands
- Read hardware clock date and time:
$ hwclock
- Copy system time to hardware time:
$ hwclock -w
- Copy hardware time to system time:
$ hwclock -s
- Set hardware clock date and time manually:
$ hwclock --set --date "02/20/2016 11:10:00"
Change System Time Zone
To change the time zone, follow the steps below:
- run:
$ raspi-config
- select Localisation Options,
- select Timezone.
Network time synchronization
There's a systemd-timesync service running by default on a Raspberry Pi OS installation. Systemd-timesyncd is a daemon added for synchronizing the system clock across the network. It implements an SNTP client. Make sure the machine is allowed to query servers over port 123/UDP.
To check the service status, use:
$ timedatectl
The Access/Modify/Change times on this file show when systemd-timesyncd last modified it.
Restarting the systemd-timesyncd service forces a sync:
$ systemctl restart systemd-timesyncd
Systemd-timesyncd automatically updates the hardware clock after synchronization.
Network time synchronization is enabled by default. To disable it, use:
$ timedatectl set-ntp false