Go Down

Topic: DS1307 Real time clock Datalogger (Read 2 times) previous topic - next topic


Thank you dhenry for your answer, but as I said before, this is a fake of my code, this may cause problems if the day changes.....I changed it for UNIXtime, which solves both problems (overflow and this error).

NickPyner: This is a good idea, but if the refresh rate is 1,2,3 seconds or 7...? But this could be a good option if I can't solve it by other way.

Thank you to both :)


Your rtc will not return a 32-bit time. The only rtc that I know of that will do this is from st.

So regardless of how you keep time (via a 32-bit type or via struct time), you have to perform a conversion. That means you have to deal with promotion and issues surrounding that.

Go Up