SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kromberg
Is there any way to set the clock to the correct current time?
By kromberg
It seems the RTC always reverts back to the original compile time date when the sparkfun arduino unit it powered off. Is there any ways to set and/or preserve it's 'current' time? Seems the compile time date is a couple of seconds off when the compiled sketch is loaded.
By jremington
If there is a good backup battery on the DS1307 module, it will keep time when the power is off. Post a link to the module you have.

The DS1307 is a poor timekeeper and will typically gain or lose a minute or two every day. The DS3231 is much better.

It is tricky to set any RTC to the correct time, because data transfer will take some time to execute. With some trial and error, you can get the RTC time to be current within a few seconds.