I would like to set automatically timezone on my Arduino with ethernet card. So I'd like to know if there is the service which can return client timezone on http request.
Asked
Active
Viewed 298 times
-1
-
Based on what source information? – Matt Johnson-Pint Aug 31 '14 at 02:40
-
Yes, but there are no too much source information since request will be send by arduino. In fact there is only IP I guess. – Филипп Цветков Aug 31 '14 at 08:16
1 Answers
1
Since you have nothing but the IP address, then the only possibility is to guess at the location via IP geolocation. For example, you could use ipinfo.io, or freegeoip.net, or any number of other sources. (A Google search for "IP Geolocation" will show many results).
Of course, IP Geolocation isn't all that accurate, and you may have many incorrect results. If your device has GPS or some other source of location data, that would be much more accurate than IP Geolocation.
Once you have a latitude and longitude, you can call one of the API's listed here to return the time zone.

Community
- 1
- 1

Matt Johnson-Pint
- 230,703
- 74
- 448
- 575