ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internal clock difference is opposite.

jgrulich opened this issue · comments

Hi, I'm using this lib with ESP8266 with the latest core and found that internal clock are 4 seconds faster, than reference. This is not a issue, but ezTime update reports that internal clock i slower, not faster as it is.

14:59:34.144 -> UTC before update: 12:59:38.025
14:59:34.144 -> Querying ntp.ufe.cz ... success (round trip 108 ms)
14:59:34.238 -> Received time: Saturday, 24-Apr-21 12:59:34.279 UTC (internal clock was 3855 ms slow)

Left is time from PC which was synchronized jut before test.
12:59:38.025 is internal time just before update:

Serial.println("UTC before update: " + UTC.dateTime("H:i:s.v")); updateNTP();

My sketch is a loop, sleeping for 4 minutes, read de BME680 sensor, sends a json and falling in light-sleep for 4 minutes
iam running this sketch on a esp32-s2 think plus from Sparkfun, in this script iam running events() every loop, so the time is synchronized

the message with is showing up when the time is synchronized, is confusing me.
becauce i think the RTC is running to fast insteda of (internal clock was 11863 ms slow)

Who can explain?

this is the log

Going to light-sleep now
Saturday, 17-Jul-2021 16:48:55 CEST << AFTER SLEEP PRINTING THE TIME
............... << CONNECTING TO WiFI, each dot is 50ms
Querying pool.ntp.org ... success (round trip 47 ms) << events() is running
Received time: Saturday, 17-Jul-21 14:48:50.271 UTC (internal clock was 11863 ms slow) << THE CLOCK IS 11,8 sec SLOW, WHILE I THINK HE IS RUNNIG TO FAST

DOING SOME WORKLOAD HERE

Going to light-sleep now << AFTER DOING THE WORKLOAD FALLING IN SLEEP AGAIN