Timelib and DS3231


Well-known member
Over my years playing with various Arduinos I've built many sketches that included the trusty old DS1307 RTC, using code based on excellent descriptonm at the PJRC Time Library page. I've also used same basis for getting GPS time.

Recenty I've started using the (much more accurate) DS3231 but that has revealed the many and varied RTC libraries and their different methods.

I have DS3231 working with RTClib (Adafruit I think) easy enough, but I want to reuse much of my legacy code, ideally simply replacing DS1307 with DS3231.

But I haven't yet figured out how to link TimeLib with the DS3231, ideally a DS3231 example like TimeRTCset. Suggestions appreciated ...

PS: related is this excellent description of TimeLib by Paul in 2017. (especially post #7) Is this still current? Is there a more current Wiki or blog I should read?
Last edited:
OK I've since realised this was a dumb question,
For anyone else with same query: it turns out using the DS1307RTC and Timelib also work with the DS3231 RTC.
If only I'd known before wasting too much time on other (lesser :) ) libraries for the DS3231/