30-10-2018, 23:19
What a mystery...
That is what I'm testing right now, and it is working for me, this may explain why I can't reproduce the problem. However, why is it working for me?
RTC_Time is the timestamp returned by the SyncProvider function. I'm testing it with a 45 seconds interval so its value can't be equal to RTC_Time2. Done just for checking what is retuned by the function.
RTC_Time2 is the timestamp read from the RTC right after the NTP update.
Local Time is obviously the local timestamp after NTP update (testing at 1 minute intervals).
Out of curiosity, what IDE version are you using? I'm compiling with 1.8.4, but I can also try with 1.8.6
That is what I'm testing right now, and it is working for me, this may explain why I can't reproduce the problem. However, why is it working for me?
Code:
RTC Time: 1540937345
RTC Time2: 1540937379
Local Time: 1540937379
RTC Time: 1540937423
RTC Time2: 1540937439
Local Time: 1540937439
RTC Time: 1540937483
RTC Time2: 1540937499
Local Time: 1540937499
RTC Time: 1540937544
RTC Time2: 1540937559
Local Time: 1540937559
RTC Time: 1540937603RTC_Time is the timestamp returned by the SyncProvider function. I'm testing it with a 45 seconds interval so its value can't be equal to RTC_Time2. Done just for checking what is retuned by the function.
RTC_Time2 is the timestamp read from the RTC right after the NTP update.
Local Time is obviously the local timestamp after NTP update (testing at 1 minute intervals).
Code:
time_t RTC_time2 = RTC.now().unixtime();
Serial.print("RTC Time2: "); Serial.println(RTC_time2);
Serial.print("Local Time: "); Serial.println(local);Out of curiosity, what IDE version are you using? I'm compiling with 1.8.4, but I can also try with 1.8.6

