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

SetLocation for "ie", "uk" and "pt" does not work #47

Closed witnessmenow closed 4 years ago

witnessmenow commented 5 years ago

Using the timezones examples as base, none of the above return the correct time. They display as UTC, when they should be now UTC + 1

When you enable info serial prints, you see that none of them return a response for the timezone lookup. Setting the country code to "de" works as expected (UTC +2) and returns a response to the timezone lookup.

Setting the timezone in the olson format works as expected ("Europe/Dublin" returns UTC +1)

emeyedeejay commented 5 years ago

I believe they only work for countries with a single time zone. I had the same with ZA but the Olson strings work too. Does GEO IP lookup work for you? I would think not for the same reason.

ropg commented 5 years ago

For some reasons the country lookups do not work anymore, except for a few that are programmed exceptions, such as "de" (Don't ask). I'll keep this issue open and have a look at it later.

Either way, the preferred way to do a timezone setting is by the olson string, so for the UK that would be "Europe/London" (or any unique substring thereof, such as "London") See here for a list of these timezone identifier strings.

emeyedeejay commented 5 years ago

Is this the same reason GeoIP doesn't work as well? That is a fantastic feature!

Thanks for this library - it's amazing how much it does!

ropg commented 4 years ago

I fixed this issue. Sorry it took a long time...