I just successfully added a DS3231 I2C real time clock to my Raspberry Pi Zero 2 W. The steps I followed were to add an overlay line to /boot/firmware/config.txt.I then rebooted. The instructions I followed said to remove the fake-hwclock as it may cause conflicts and said to run these two commandsThe time looks OK:When I look at timedatectl status:I am confused by the NTP service being set to inactive.
My expectation, which may be wrong, was that the RTC clock would be used to initialize the system clock. If NTP is available then NTP would be used to keep the system clock synchronized and also keep the RTC clock up to date. If NTP is not available for some reason then the Real TIme Clock would be used until NTP became available.
How does NTP and a RTC interact with each other ?
Thanks
Chris
Code:
# Uncomment some or all of these to enable the optional hardware interfacesdtparam=i2c_arm=on# Enable ds3231 RTC clock on i2c busdtoverlay=i2c-rtc,ds3231Code:
sudo apt-get remove --purge fake-hwclocksudo timedatectl set-ntp falseCode:
$ sudo hwclock -r2025-03-14 12:21:03.532331-05:00Code:
$ timedatectl status Local time: Fri 2025-03-14 12:22:09 CDT Universal time: Fri 2025-03-14 17:22:09 UTC RTC time: Fri 2025-03-14 17:22:09 Time zone: America/Chicago (CDT, -0500)System clock synchronized: yes NTP service: inactive RTC in local TZ: noMy expectation, which may be wrong, was that the RTC clock would be used to initialize the system clock. If NTP is available then NTP would be used to keep the system clock synchronized and also keep the RTC clock up to date. If NTP is not available for some reason then the Real TIme Clock would be used until NTP became available.
How does NTP and a RTC interact with each other ?
Thanks
Chris
Statistics: Posted by chriskot870 — Fri Mar 14, 2025 5:31 pm