Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8052

Raspberry Pi OS • Using Real Time Clock vs NTP

$
0
0
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.

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,ds3231
I then rebooted. The instructions I followed said to remove the fake-hwclock as it may cause conflicts and said to run these two commands

Code:

sudo apt-get remove --purge fake-hwclocksudo timedatectl set-ntp false
The time looks OK:

Code:

$ sudo hwclock -r2025-03-14 12:21:03.532331-05:00
When I look at timedatectl status:

Code:

$ 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: no
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

Statistics: Posted by chriskot870 — Fri Mar 14, 2025 5:31 pm



Viewing all articles
Browse latest Browse all 8052

Trending Articles