Lookup a time zone by latitude/longitude using the nearest neighbor method.
The nearest neighbor method can sometimes be inacurrate, if compared to a point lookup in a polygon. In most cases, the risk of inaccuracy is acceptable.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install tzwhere
TZWhere.lookup(41.7599, -87.2079) # => "America/Chicago"
Ensure the test dependencies are installed:
Run the test suite:
$ rake test
Copyright (c) 2014 Adam Daniels (email@example.com).
See LICENSE for details.