Skip to content

RTC

RB300 and RB350 have a real-time clock with a supercapacitors backup. When the system starts, it takes the time from the RTC if system clock update is failed through 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