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.
MIT License
327 stars 92 forks source link

Won't sync with NTP if module can't access internet #169

Open TheGroundZero opened 1 year ago

TheGroundZero commented 1 year ago

Issue

For more background information, see https://github.com/jnthas/clockwise/issues/39

As per JeffWDH's investigation, this module will (attempt to) connect to timezoned.rop.nl on port udp/2342 before connecting to a (custom) NTP server. If this request to timezoned fails, it will not continue connecting to the NTP server.

As a result, this module won't correctly set the time on a device that's not connected to the internet, even if it's configured to use a locally-hosted NTP server.

Solution

The module should not rely on a connection on the internet. As a mimum, a failed connection to timezoned.rop.nl should not stop the further process of syncing to a (manually configured) NTP server.

TheGroundZero commented 1 year ago

As the connection to timezones is only to turn a timezone name into an POSIX string, maybe this string could be provided by the application including this module?