This section describes how to set the time zone, date, and time.
Setting Time Zone
To see the current time zone, list the contents of the /etc/timezone directory.
To set the time zone, run the dpkg-reconfigure tzdata command as root.
Navigate through the menus to set the appropriate time zone.
Then, the selected time zone should be displayed.
Verify if the time zone is correctly set.
Setting Date and Time
The switch has a hardware clock that maintains system time, even when the switch is rebooted or powered off. The hardware clock is powered by a battery on the system board. When the switch is running, PicOS maintains its own software clock. During switch boot up, the hardware clock is copied to the software clock maintained by PicOS. The software clock is then referenced for anything that requires time keeping. During switch shut down, the software clock is copied back to the hardware clock.
To set the date and time on the software clock, use the date command as root.
To display the current date and time, use the date command without arguments.
To set the date and time on the hardware clock, use the hwclock command as root.