> It uses WiFiManager to set up the connection from the ESP to a router (I >> strongly recommend WiFiManager, Actually I use ASyncWifiManager because I >> use the ASyncTCP libraries). In doing so, it gets the user's location from >> the browser and then uses google's location APIs to get the timezone data. >> The net result is that it uses NTP to get UTC time, and then automatically >> adjusts it for the timezone/DST in the user's location. >> >> It looks like the user can override the location if they want to. >> > For a product to be sold I would not rely on public and free APIs exposed from a single vendor, since they are always subject to change (or disappear). How would you deal with those changes once your devices are deployed around the world?!
Different story if you're implementing on a Linux-based system like the Raspberry PI, that will then use the embedded NTP daemon "ntpd" to keep the clock in sync and also take care or clock skew/drift over time. NTP is a worldwide standard part of the Internet infrastructure, and won't go away. As for DST switching I went for a static way, hoping that governments won't change the rules (but that's more bodies that have to agree rather than a single business whose name begins with G). In just 100 bytes of static memory I hardcoded DST switchover days for the next 100 years (up to 2116). Explained here http://ik1zyw.blogspot.it/2016/10/cheating-on-dst-calculation.html and here http://ik1zyw.blogspot.it/2016/10/100-years-of-dst-dates-for-europe-2016.html you've got the resulting array for Western Europe and the Perl script used to generate it. BTW, the code of espclock linked above checks the time every 90 seconds, which is way too often! Unless you're running some mission critical application out of your clock, once a day is enough. Paolo -- You received this message because you are subscribed to the Google Groups "neonixie-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+unsubscr...@googlegroups.com. To post to this group, send an email to neonixie-l@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/CABj2Vaapd99YyLUqa%2B%2BQJ5JwsxhOOrX%2BERorjAG56LecOa8NUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.