-
Hey Makuna, sorry to bother you again. But this time it isn't about the timelib, so that's something else. ;) As you've noticed I'm using your RTC library in my ClockSketch on Instructables. Yesterday somebody Tests done using Arduino IDE 1.8.13 and 1.8.18 This is DS3231_simple from your library @2.3.5:
The only change I made is this line in loop():
Using 2.3.5 and compiling for nodeMCU or Arduino Nano does work as expected, IDE version does not matter. Using 2.3.6 the added line throws an error in all combinations:
Isn't getting Epoch32Time() supported in the way I'm using it? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
time_t I believe is just a uint32_t; so anywhere below you could replace uint32_t with time_t and people were hitting it. This line is incorrect
tmp2 was being constructed with the wrong time value, it takes a seconds from 2000/1/1. Epoch32Time is seconds since 1970/1/1. Your assumption was a common issue that people were making.
It doesn't return unix time so it was causing support issues and bugs in users code.
Which is also wrong. The uint32_t constructor wasn't unix or epoch time; both of these worked in the Arduino time which was based on 2000/1/1. |
Beta Was this translation helpful? Give feedback.
time_t I believe is just a uint32_t; so anywhere below you could replace uint32_t with time_t and people were hitting it.
This line is incorrect
tmp2 was being constructed with the wrong time value, it takes a seconds from 2000/1/1. Epoch32Time is seconds since 1970/1/1.
Your assumption was a common issue that people were making.
Two issues were happening. Calling something like this...
It doesn't return unix time so it was causing support issues and bugs in users code.
But, at the same time, they were also doing something like this which is what your statement really is doing...