This is something you should address in a PI forum. But just like any other IC2 RTC hat, you enable THE i2C bus in raspi-config then edit the startup file, and remove the fake HW clock application and comment out the configuration.
you first start be updating your packages:
sudo apt update
sudo apt upgrade
then run raspi config to tuen on I2C
sudo raspi-config
then you reboot:
sudo reboot
then you install the I2C utils:
sudo apt install python3-smbus i2c-tools
Then run this to check if your I2C is wired correctly and working, ID#68 should be the response for RTC chips:
sudo i2cdetect -y 1
This will Display ID#68. When the driver is working and RTC is in use, the above command will return UU instead.
Now you need to know what RTC chip you are using ( DS1307, DS3231, or the PCF85231)
then you have to edit the startup file:
sudo nano /boot/config.txt
and at the bottom of the file, you need to add the enable function and the chip used (DS3231 for example ):
dtoverlay=i2c-rtc,ds3231
Save and reboot
sudo reboot
Then test it:
sudo i2cdetect -y 1
it should output a wall of text, if “UU” appears instead of “68” then we have successfully loaded in the Kernel driver for the RTC.
then we clean the environment and remove fake-hwclock once the RTC is verified working:
sudo apt -y remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
now we clean up systemd udev startup script:
sudo nano /lib/udev/hwclock-set
inside this file, find the fallowing code:
if [ -e /run/systemd/system ] ; then
exit 0
fi
and comment it out like this:
#if [ -e /run/systemd/system ] ; then
# exit 0
#fi
now, check your current time and date on the Pi4 with the date command:
date
now if the time and date are correct, then write the correct time and date to the RTC chip:
sudo hwclock -w
You will only need to run the above command if you ever change the battery.
To read the current time from the RTC directly, use this command:
sudo hwclock -r
I know there is not many sources of documentation out there, but this will work for you.