I found a sketch named gps_rtc_updater that may or may not actually set an RTC. I discovered that there was far more information available to display that helps to understand the process, and to verify that various stages have been performed successfully.
my changes were to the display and formatting of both the code and the Serial monitor output; I made no modifications in the engine room.
if you have a working GPS and a DS3231 I2C this will:
sync to your GPS;
set the Time parameters for the Time library;
adjust the Time to your time zone and display the results;
convert Time format to RTC format;
write this time to the RTC;
display the information sent to the RTC;
read the RTC;
display the results;
compare the two, and tell you if it succeeded.
when I know this works, I will add an SD utility to make it a full service datalogger diagnostic tool.
what I need now is for people to try it on their GPS > RTC > clock and see if it sets your RTC time correctly. my RTC responds, but some things get set right, some get set randomly, and the year is consistently 16 years ago. this is not a good day to need a CR1220 in a very small town.
and I just thought of a couple of things to add.
posted as an attachment because it’s too big for code tags
Level_1_Diagnostic.ino (9.37 KB)