Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone?
+10
A:
Take a look at Geonames.org
It's a free webservice that allow you to get a lot of informations from a long/lat
Here's some info you can get from long/lat: (complete list of webservices here)
- Find nearest Address
- Find nearest Intersection
- Find nearby Streets
- Elevation
- Timezone
Frederic Morin
2008-09-03 12:15:17
this will give you the current time and the offsets for daylight savings and standard but I'm having trouble finding whether a date in the future is under Daylight savings
Scott Cowan
2008-11-05 14:24:42
for that, the Java Calendar will probably be more usefull
Frederic Morin
2009-10-08 14:30:24
+1
A:
How much accuracy do you need? Dividing the longitude by 15 would almost be right :p
Tom
2008-09-03 12:18:26
I was being pretty facetious when I made this answer, but not until I came across this question again when trying to solve the problem myself did I realise how totally useless the idea is: http://upload.wikimedia.org/wikipedia/commons/e/e7/Timezones2008.png (unless you're in international waters)
Tom
2009-06-03 11:41:57
+2
A:
There's a tutorial for getting the time zone from latitude and longitude using Google Maps and Geonames.org here: http://vancouverwebconsultants.com/getting-time-zone-from-latitude-longitude/
Fo
2009-05-04 03:54:09