RSB-3730 RTC

From ESS-WIKI
Revision as of 10:05, 9 November 2023 by Xingxing.li (talk | contribs) (Created page with " '''1. Disable rtc sync service.''' <pre># systemctl disable ntpd.service Removed /etc/systemd/system/multi-user.target.wants/ntpd.service. # systemctl stop systemd-timesyncd...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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