-
jremington posted a new activity comment 9 years, 9 months ago
How do I convince a DS3231 to output seconds since 1/1/2000? I can’t find anything in the DS3231 data sheet describing such a function.
jremington posted a new activity comment 9 years, 9 months ago
How do I convince a DS3231 to output seconds since 1/1/2000? I can’t find anything in the DS3231 data sheet describing such a function.
If you’re using the DS3231 library, you can use the following code:
DateTime now = RTC.now(); //get the current date-time
currentepochtime = (now.get()); //seconds since 1/1/2000
Look at the “now” example that comes with the DS3231 library to see the whole sketch.