Time zones

IANA zone names on timezone-boundary-builder 2026f · checked against shapely on the full-resolution map, and geo-tz

What it is

Given a latitude and longitude, the IANA time zone names whose polygons contain it, like America/Vancouver. The device’s own time zone database turns a name into an offset and daylight saving; the map only says which name.

No authority publishes time zone borders as lines. The IANA database has the names and the rules. timezone-boundary-builder draws the borders from OpenStreetMap, about five times a year, each within days of the IANA release it follows. This file uses its 2026f release.

A real lookup runs on a simplified map, small enough to ship in an app, so right at a border it can give the neighbouring zone. The file says how close is close enough: within 20 m of an edge either zone passes; anywhere else the answer must match the full-resolution map exactly. OpenStreetMap’s borders are good to about 10 m, so asking for better tests nothing real.

A border between America/New_York and America/Moncton with a band 20 m either side shaded: test points at 5 and 15 m fall inside it, where either zone passes, and points at 25, 50 and 150 m fall outside, where the answer must be exact
  • The answer is a list. Usually one name. Two where the map overlaps zones on purpose, like Xinjiang’s Asia/Shanghai and Asia/Urumqi: return both, and let the app choose.
  • Water near the coast takes the coast’s zone. Out to the end of the territorial sea, 12 nautical miles, a harbour or a ferry gets the coastal zone, daylight saving and all. Past it come plain 15° bands, Etc/GMT-12 to Etc/GMT+12, split straight at 180°, so open water near Kiribati is a day off the islands.
  • A name, not a clock. The offset and daylight saving come from the IANA database on the device. A newer name, like America/Ciudad_Juarez, can be missing from an older phone’s list.
  • This file is ODbL, not CC0. Its zones come from OpenStreetMap through timezone-boundary-builder, so it carries their licence and credit. So does any map built from the same data.

Operations

OperationGives
timeZone Every time zone whose polygon contains a pointIn: latitudeInDegrees, longitudeInDegrees
Out: timeZoneNames

Fields

FieldMeaning
latitudeInDegrees−90 to 90, WGS84, north positive
longitudeInDegrees−180 to 180, WGS84, east positive. 180 is the same meridian as −180.
timeZoneNamesEvery IANA time zone name whose polygon contains the point, in any order. Usually one; two where the zones overlap on purpose, like Xinjiang's Asia/Shanghai and Asia/Urumqi. A point on an edge is in both zones, and one on the date line or at a pole is in every zone that touches it. The zones cover the earth, so it's never empty.
nearbyNot an output: every zone whose edge is within 1 km of the point, including those it's in, nearest first. A zone listed within the tolerance may be in the answer or not; see Comparing.
timeZoneNameIn each nearby entry: an IANA time zone name
distanceInMetersIn each nearby entry: the shortest distance from the point to that zone's edge, on WGS84, to 0.1 m. An edge runs straight in latitude and longitude between the source's points, as point-in-polygon takes it.

Edge cases

CaseWhat it tests
edge-eastporttimeZoneNOAA's Eastport tide station: America/New_York, an hour behind Welshpool across the water.
edge-welshpool-campobellotimeZoneCHS's Welshpool station on Campobello Island, New Brunswick, 2.7 km from Eastport: America/Moncton.
edge-window-rocktimeZoneThe Navajo Nation's capital, in Arizona: America/Denver, since the Navajo Nation keeps daylight saving.
edge-kykotsmovitimeZoneThe Hopi Reservation, inside the Navajo Nation: America/Phoenix, with no daylight saving, a hole inside a hole.
edge-flagstafftimeZoneArizona outside the Navajo Nation: America/Phoenix.
edge-baarle-hertog-enclavetimeZoneThe deepest point of the largest Belgian enclave in Baarle-Nassau: Europe/Brussels, inside Europe/Amsterdam.
edge-baarle-nassau-counter-enclavetimeZoneThe deepest point of the largest Dutch enclave inside a Belgian one: Europe/Amsterdam, inside Europe/Brussels, inside Europe/Amsterdam.
edge-urumqitimeZoneXinjiang, where timezone-boundary-builder overlaps Asia/Shanghai and Asia/Urumqi on purpose: both.
edge-juan-de-fuca-overlaptimeZoneThe deepest point where the Canadian and US territorial seas overlap in the Juan de Fuca Strait: both zones.
edge-lord-howe-islandtimeZoneAustralia/Lord_Howe, whose daylight saving moves the clock 30 minutes.
edge-chatham-islandstimeZonePacific/Chatham, 12 h 45 min ahead of UTC in winter.
edge-kiritimatitimeZonePacific/Kiritimati, 14 hours ahead of UTC.
edge-open-water-west-of-kiritimatitimeZoneOpen water about 130 km west of Kiritimati: the plain band Etc/GMT+11, 25 hours behind the island.
edge-kantontimeZonePacific/Kanton, 13 hours ahead of UTC.
edge-fiji-180timeZoneFiji's waters at 180°: Pacific/Fiji, as at −180°.
edge-fiji-minus-180timeZoneFiji's waters at −180°, the same point as 180°.
edge-date-line-180timeZoneOpen water on the date line: both bands it divides, since 180° and −180° are one meridian.
edge-date-line-minus-180timeZoneThe same point as edge-date-line-180, written with −180°.
edge-ocean-band-linetimeZoneOpen water exactly on −142.5°, the edge between two 15° bands: both.
edge-longyearbyentimeZoneSvalbard: Arctic/Longyearbyen, its own name though it keeps Oslo's time.
edge-north-poletimeZoneThe North Pole, where every band's edge meets: every band is right, and an empty answer isn't.
edge-south-poletimeZoneThe South Pole: Antarctica/McMurdo takes in the whole pole, with no other zone's edge within 1 km.
edge-mcmurdotimeZoneMcMurdo Station: Antarctica/McMurdo, which keeps New Zealand's time.
edge-vostoktimeZoneVostok Station, in Antarctica's hand-drawn blocks: Antarctica/Vostok.
edge-halifax-harbourtimeZoneWater inside the territorial sea gets the coastal zone, with its daylight saving: America/Halifax.
edge-a12-platformtimeZoneOpen water in the Dutch North Sea's gas fields, past the territorial sea: the band Etc/GMT, not Europe/Amsterdam.
edge-gulf-of-mexico-deepwatertimeZoneThe Gulf of Mexico's deepwater oil fields, past the territorial sea: the band Etc/GMT+6, not America/Chicago.
edge-coyhaiquetimeZoneAysén, Chile: America/Coyhaique since timezone-boundary-builder 2025b. Older maps say America/Santiago.
edge-golden-bctimeZoneGolden, BC: America/Edmonton since 2026d. Older maps say America/Vancouver.
edge-ciudad-juareztimeZoneAmerica/Ciudad_Juarez, a name tzdb added in 2022g: an older phone's time zone list may not have it.

Their inputs and expected values are in vectors.json; search for the case's id.

For agents

Return every IANA zone whose polygon contains the point, from a map of timezone-boundary-builder 2026f’s timezones-with-oceans data, the full-resolution variant with every IANA name. Return all the zones the lookup finds, not the first: the map overlaps zones on purpose. The zones cover the earth, so the answer is never empty. 180° and −180° are one meridian. Refuse a latitude outside −90 to 90, a longitude outside −180 to 180, NaN and infinity, as outOfRange.

Any lookup that passes counts. The implementations graded here read one map: ZoneDetect’s format, version 1, at 21 bits, built with ZoneDetect’s own builder (github.com/BertoldVdb/ZoneDetect, commit 81ede72) from 2026f’s timezones-with-oceans.shapefile.zip, SHA-256 a2f74a5c510d9a5a37c8f36078ae064801013e277ff8f2833c19637c724f8ab0. To write another, port ZoneDetect’s C reader (library/zonedetect.c) and pin the map by its SHA-256; don’t design a format.

But test the point exactly, not as ZoneDetect does. ZoneDetect truncates the point to the map’s grid and counts it as on an edge when it’s within one grid step east or west, about 19 m at the equator. Then it returns both zones at points 25 m from a border, and fails here. Compare the unrounded point with the map’s vertices instead. Where that finds no zone, in a sliver between two rounded edges, fall back to ZoneDetect’s rule. On 2026f’s map that passes every case.

Pass every case in vectors.json. Near a border, a case’s nearby gives each zone’s distance to its edge; a zone within the 20 m tolerance may be in your answer or not. Everywhere else the answer must be exact. nearby is for the judge: never return it.

Test data

vectors.json holds 1836 cases, published 2026-11-10. Earth model: WGS84. How to read it: Test data format.

Licence: ODbL 1.0 (https://opendatacommons.org/licenses/odbl/1-0/). Contains information from OpenStreetMap, through timezone-boundary-builder, which is made available here under the Open Database License. © OpenStreetMap contributors.

OperationCases
timeZone 18361830 reference · 30 edge · 5 polar · 6 invalid

Tags say where each value came from: what they mean.

FieldTolerance
timeZoneNameswithin 20 m of a border

Every other field is compared exactly.

Implementations

ImplementationStatus
gshaw/algorithms-swiftSwift Passes
gshaw/algorithms-typescriptTypeScript Incomplete

Each implementation's CI grades it against this page's test data on every push, and again when the data changes. The code isn't public yet. See how implementations work.

Source

Zonestimezone-boundary-builder 2026f: timezones-with-oceans.geojson, the full-resolution file with every IANA nameEvan Siroky, from OpenStreetMap. 444 zones. Not republished here: its URL and SHA-256 head /time-zones/sources/shapely.txt · ODbL 1.0
Labels and distancesshapely 2.2.0 (GEOS 3.14.1) for the zones at each point, and pyproj 3.8.0 (PROJ 9.8.1) for the distance to each edge on WGS84Every point and answer is in /time-zones/sources/shapely.txt. geographiclib checks the distance to every nearest vertex · BSD 3-Clause and MIT
Checkgeo-tz 8.1.11 (geo-tz/all), on the same releaseEvan Siroky, timezone-boundary-builder's author. Agrees with every case more than 1 m from an edge. Every answer is in /time-zones/sources/geo-tz.txt · MIT