<p>Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone?</p>

[{'answer_id': 41512, 'author': 'chs', 'author_id': 4325, 'author_profile': 'https://Stackoverflow.com/users/4325', 'pm_score': 2, 'selected': False, 'text': '<p><strong>Project dead :-/</strong></p>\n\n<p>These look pretty promising-</p>\n\n<p>Archive link:</p>\n\n<p><a href="https://web.archive.org/web/20150503145203/http://www.earthtools.org/webservices.htm" rel="nofollow noreferrer">https://web.archive.org/web/20150503145203/http://www.earthtools.org/webservices.htm</a></p>\n'}, {'answer_id': 41533, 'author': 'Frederic Morin', 'author_id': 4064, 'author_profile': 'https://Stackoverflow.com/users/4064', 'pm_score': 5, 'selected': False, 'text': '<p>Take a look at <a href="http://www.geonames.org/" rel="noreferrer">Geonames.org</a></p>\n\n<p>It\'s a free webservice that allow you to get a lot of informations from a long/lat</p>\n\n<p><a href="http://www.geonames.org/export/client-libraries.html" rel="noreferrer">They also provide a free (and open source) Java Client for GeoNames Webservices library (library for other language also provided: ruby, python, perl, lisp...)</a></p>\n\n<p>Here\'s some info you can get from long/lat: <a href="http://www.geonames.org/export/ws-overview.html" rel="noreferrer">(complete list of webservices here)</a></p>\n\n<ul>\n<li>Find nearest Address</li>\n<li>Find nearest Intersection</li>\n<li>Find nearby Streets</li>\n<li>Elevation </li>\n<li>Timezone</li>\n</ul>\n'}, {'answer_id': 41540, 'author': 'Tom', 'author_id': 3715, 'author_profile': 'https://Stackoverflow.com/users/3715', 'pm_score': 2, 'selected': False, 'text': '<p>How much accuracy do you need?  Dividing the longitude by 15 would almost be right :p</p>\n'}, {'answer_id': 4405918, 'author': 'Jules', 'author_id': 537431, 'author_profile': 'https://Stackoverflow.com/users/537431', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://drtengine.com/pages/geo_get_timezone" rel="nofollow">DRT Engine</a> takes a latitude, longitude and local datetime and returns a timezone offset. This can be used to establish the timezone of a particular location at a <em>future</em> date.</p>\n'}, {'answer_id': 5519523, 'author': 'James D', 'author_id': 688365, 'author_profile': 'https://Stackoverflow.com/users/688365', 'pm_score': 7, 'selected': True, 'text': '<p>I looked fairly deeply into this question for a project I am working on.  GeoNames.org and EarthTools.com are both good options for many situations but with the following serious flaws:</p>\n\n<ul>\n<li>GeoNames.org finds the time zone by searching for the nearest point in their database that contains a time zone field.  This often leads to the wrong result near borders.  It is also painfully slow, leading to query times on the order of a couple seconds per request.  It also doesn\'t return a valid time zone if there is no item in their database near the query point.  GeoNames also restricts the number of queries that can be made per day, making bulk operations difficult.</li>\n<li>EarthTools.org uses a map and is able to return queries quickly, but it doesn\'t take into account daylight savings time for most locations, and it returns a raw offset rather than a time zone ID (i.e., they return "GMT-7" instead of "America/Chicago").  Also, I just looked at their page while preparing this post and Google Chrome warned about malware on their site.  That is new to me and it may change, but is obviously a cause for concern.</li>\n</ul>\n\n<p>These flaws meant that these existing tools were not suitable for my needs so I rolled my own solution and have published it for general use.  You can find it here:</p>\n\n<p><a href="http://www.askgeo.com/" rel="noreferrer">http://www.askgeo.com/</a></p>\n\n<p>AskGeo is based on a time zone map of the world, so it returns a valid time zone for every valid latitude and longitude.  It returns the standard time zone ID (e.g., "America/Los_Angeles") used on Linux and most other operating systems and programming frameworks.  It also returns the current offset, taking full account of daylight savings time.</p>\n\n<p>It is extremely easy to use and usage is documented on the main page of the site.  The API supports batch queries, so if you need to do a lot of look-ups, please use the batch interface rather than bog down our servers with serial requests.  The bulk queries are also much faster, so everybody wins.</p>\n\n<p>When we first launched this, we built it on Google App Engine (GAE) and made it free to all users.  This was possible because GAE\'s prices were so low at that time.  Since then, our server load has increased substantially and GAE\'s prices went way up.  Both factors combined led us to switch to Amazon Web Services for hosting and to start charging for commercial use, while keeping the service free for non-profit, non-commercial open source projects, and researchers.  For commercial users, we provide 1000 free queries to let potential customers evaluate the API to make sure it meets their needs.  See the web site for pricing and terms.</p>\n\n<p>The underlying library was written in Java and due to popular demand, we also released the library under a commercial license.  Full documentation of the library and pricing details are on the web site.</p>\n\n<p>I hope this is useful.  It certainly was useful for the project I was working on.</p>\n'}, {'answer_id': 8955468, 'author': 'Tim Parenti', 'author_id': 782129, 'author_profile': 'https://Stackoverflow.com/users/782129', 'pm_score': 3, 'selected': False, 'text': '<p>Eric Muller has made <a href="http://efele.net/maps/tz/" rel="noreferrer">shapefile maps</a> for the timezones of the tz (Olson) database.  A few minor caveats, though:</p>\n\n<ol>\n<li>The boundaries used are often unofficial.</li>\n<li>It isn\'t updated as regularly as the tz database itself, so some newly-formed or -adjusted zones may be missing.</li>\n</ol>\n\n<p>Those aside, however, it seems to be very accurate for most purposes.</p>\n'}, {'answer_id': 9126209, 'author': 'Jiho Kang', 'author_id': 818351, 'author_profile': 'https://Stackoverflow.com/users/818351', 'pm_score': 3, 'selected': False, 'text': '<p>The Yahoo places API provides timezone information via reverse geolocation.</p>\n\n<p>Check it out.</p>\n\n<p><a href="http://developer.yahoo.com/geo/placefinder/guide/requests.html" rel="noreferrer">http://developer.yahoo.com/geo/placefinder/guide/requests.html</a></p>\n'}, {'answer_id': 12887939, 'author': 'john', 'author_id': 1745775, 'author_profile': 'https://Stackoverflow.com/users/1745775', 'pm_score': 4, 'selected': False, 'text': '<p>Timezones are now available via Google API</p>\n\n<p><a href="https://developers.google.com/maps/documentation/timezone/">https://developers.google.com/maps/documentation/timezone/</a></p>\n'}]
['https://Stackoverflow.com/questions/41504', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/797/']