RSB-3730 RTC

From ESS-WIKI
Jump to: navigation, search

1. Disable rtc sync service.

# systemctl disable ntpd.service
Removed /etc/systemd/system/multi-user.target.wants/ntpd.service.
# systemctl stop systemd-timesyncd
# systemctl stop ntpdate.service

2. Set system time to current, then write to RTC.

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

3. Set one incorrect time, then read time from RTC to verify.

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

4. Restore the RTC time to system time.

# hwclock -s && date
Wed Feb 17 10:45:13 UTC 2016