You code is broken, fails on write_all to correctly set RTC hours and year values. If I set RTC via dtoverlay (Pi) or other method, then try to read back date and time, the hour and year are incorrect and read_datetime errors out where hour should be 15 it returns 25, where year should be 20 it returns as 37.
You code is broken, fails on write_all to correctly set RTC hours and year values. If I set RTC via dtoverlay (Pi) or other method, then try to read back date and time, the hour and year are incorrect and read_datetime errors out where hour should be 15 it returns 25, where year should be 20 it returns as 37.