One of the features lacking on a Raspberry PI is a Real Time Clock (RTC). This is basically a battery backed up clock that the PI can sync with to maintain clock accuracy.
apt-get install i2c-tools
Enable Interface Options/I2C
dtoverlay=i2c-rtc,ds3231
Check for I2C connectivity to the RTC. The address 0x68 should be listed after running this command:
i2cdetect -y 1
apt-get remove --purge fake-hwclock
#if [ -e /run/systemd/system ] ; then
# exit 0
#fi
hwclock --verbose --show
hwclock --systohc
hwclock --show
Created: 2024-02-20 | Modified: 2024-04-01 |