Time Synchronisation Accuracy

Hi @andyg

You can try calling Spark.syncTime() more often (maybe once an hour). There is logic in the real-time clock code to slowly move between the current time and the new time when the clock is set to avoid a big jump in time that might be effecting you, but four seconds is a lot.

If you want more accurate time, you can try my NTP-based SparkTime library (available in the web IDE libraries section). It was created before the Spark built-in time class existed but it does have a few extra features like daylight savings time handling for the US and Europe. In my experience it is accurate to withing one second.

1 Like