RTC(ROM-5880)

From ESS-WIKI
Jump to: navigation, search

Set the system to the current time then set the RTC

# date 021710452016 && hwclock -w && date
Wed Feb 17 10:45:00 UTC 2016
Wed Feb 17 10:45:01 UTC 2016

Set one incorrect time, then read RTC to verify

# date 010100002000 && hwclock -r && date
Sat Jan 1 00:00:00 UTC 2000
2016-02-17 10:49:08.417688+00:00
Sat Jan 1 00:00:00 UTC 2000

Restore the RTC time to system time

# hwclock -s && date
Wed Feb 17 10:46:58 UTC 2016