How to Find a Time Zone from Latitude and Longitude

In most cases, we want an IANA/Olson time zone identifier, although some services return only a UTC offset or another type of identifier.

Time zone web services

Raw time zone boundary data

  • Timezone Boundary Builder — generates time zone shapefiles from OpenStreetMap data, including territorial waters near coastlines.

The following projects previously supplied time zone boundary data but are no longer actively maintained.

Offline time zone geolocation implementations

Implementations using Timezone Boundary Builder data

Implementations using older tz_world data

Libraries that call a web service

  • timezone — a Ruby gem that calls GeoNames
  • AskGeo provides its own client libraries for Java and .NET.
  • GeoNames provides client libraries for almost everything.

Self-hosted web services

Other ideas

The nearest-city method may provide only an approximation rather than the “correct” result.