I had created an infinity mirror clock a few years back and recently decided

I had created an infinity mirror clock a few years back and recently decided to upgrade it with an ESP8266 - basically to get time from an NTP server and some basic MQTT control.

Unfortunately, I’m running into a small problem. Every time my router is down, or reboots - the clock does not connect again until I physically switch if off and on. Here is the code I’m using:

Also, is there a way to get time zone automatically?

Any help would be appreciated

Not sure about the connection issue but here’s a timezone library, it works perfecty on an ESP8266

It looks like the reconnecting issue was fixed in January

Try downloading and installing the ESP8266 core from Github rather than using “boards manager”

@Jeremy_Spencer will try to download the latest.
On my other question, is there any way to find what timezone the clock is in? Similar to how computers select timezone automatically.

@Dushyant_Ahuja There is a timezone library that works off longitude and latitude, but you still need to find those…

Some of the weather data feeds also include timezone information, then you just need a city and country. You can also get sunrise and sunset data, which could be useful for patterns :wink:
https://openweathermap.org/api

@Dushyant_Ahuja Here are some options for getting geolocation with an ESP8266 using IP address, no GPS required…

@Jeremy_Spencer Thanks - that sounds cool