3. RTC Test Command in Linux System¶
3.1. date and hwclock¶
The date command can query / change the current system (software) clock on Linux
Example: Set time
Example: read time
Hwclock is used to query / change the time of hardware clock (RTC)
Example: query the time of hardware time (RTC)
Example: write the system time to the RTC time
Example: write the RTC time to the system time
(The RTC time can be read automatically when the system is powered on and synchronized to the system clock by adding /bin/hwclock -s to /etc/inittab)