Timezone lookup

The timezone of a point, and the offset in force there at a given moment.

GEThttps://api.mygeocode.com/v1/timezone

Parameters

ParameterTypeDescription
latrequired*number-90 to 90.
lonrequirednumber-180 to 180.
locationsoptionalstring*Alternative to lat and lon: up to 100 points as lat,lon|lat,lon|... or as an encoded polyline enc:.... Each point counts as one request; the answer has a results array in input order.
path, samplesoptionalstring, integer*Alternative to lat and lon: samples points (2 to 100) evenly spaced along the path lat,lon|lat,lon|..., first and last point included. Answered like locations.
bounds, rows, colsoptionalstring, integer*Alternative to lat and lon: a grid of rows by cols points (each at least 2, at most 100 points in all) over south,west,north,east, southern row first, west to east. Answered like locations.
tzoptionalstring*Alternative to coordinates: an IANA zone id such as Europe/Zurich (a Windows id is accepted too). Returns the same fields for that zone without a boundary lookup.
timestampoptionalintegerUnix time in seconds. Default: now. Any moment from 1900 to 2100 is accepted; future offsets use the rules currently published.
languageoptionalstringLanguage for name, e.g. de or pt-BR. Default English.
keyoptionalstringAPI key, if not sent as a header.

Example

$ curl -H "X-API-Key: YOUR_KEY" "https://api.mygeocode.com/v1/timezone?lat=-33.8688&lon=151.2093&timestamp=1767225600"
const url = new URL("https://api.mygeocode.com/v1/timezone");
url.searchParams.set("lat", -33.8688);
url.searchParams.set("lon", 151.2093);
url.searchParams.set("timestamp", 1767225600); // 2026-01-01T00:00:00Z

const tz = await (await fetch(url, { headers: { "X-API-Key": "YOUR_KEY" } })).json();
console.log(tz.timezone, tz.utc_offset, tz.dst);
import requests

tz = requests.get("https://api.mygeocode.com/v1/timezone",
                  params={"lat": -33.8688, "lon": 151.2093, "timestamp": 1767225600}, headers={"X-API-Key": "YOUR_KEY"}, timeout=5).json()
print(tz["timezone"], tz["utc_offset"], tz["dst"])
Response
{
  "status": "ok",
  "lat": -33.8688,
  "lon": 151.2093,
  "timezone": "Australia/Sydney",
  "name": "Australian Eastern Daylight Time",
  "abbreviation": "AEDT",
  "utc_offset": "+11:00",
  "utc_offset_seconds": 39600,
  "raw_offset_seconds": 36000,
  "dst": true,
  "dst_offset_seconds": 3600,
  "timestamp": 1767225600,
  "local_time": "2026-01-01T11:00:00+11:00",
  "country_code": "AU",
  "is_ocean": false,
  "windows_timezone": "AUS Eastern Standard Time",
  "next_transition": {
    "timestamp": 1775318400,
    "utc_offset": "+10:00",
    "utc_offset_seconds": 36000,
    "dst": false,
    "abbreviation": "AEST"
  }
}

Response fields

FieldTypeDescription
lat, lonnumber or nullThe point you sent, echoed. null when you sent tz.
timezonestringIANA name. In international waters, Etc/GMT+n or Etc/GMT-n (note the sign convention is inverted, as in IANA).
abbreviationstringAbbreviation at timestamp. For display only; not unique.
namestringLong name in force at timestamp, e.g. Australian Eastern Daylight Time.
utc_offsetstring±HH:MM at timestamp.
utc_offset_secondsintegerThe same as a number.
raw_offset_seconds, dst_offset_secondsintegerStandard offset and the daylight-saving part on top of it (0 when DST is not in effect). Their sum is utc_offset_seconds.
dstbooleanDaylight saving in effect at timestamp.
timestampintegerThe moment described.
local_timestringRFC 3339 local time with offset.
country_codestring or nullISO 3166-1 alpha-2 of the zone, null for the Etc zones at sea.
is_oceanbooleanTrue for the Etc/GMT zones used in international waters.
windows_timezonestring or nullThe matching Windows time zone id from CLDR, e.g. W. Europe Standard Time.
next_transitionobject or nullThe next offset change after timestamp, if the zone has one within two years: its timestamp, utc_offset, utc_offset_seconds, dst and abbreviation.

Notes

The same lookup in other providers' formats

If you already have code written against one of these providers, keep it: the drop-in host accepts the same path and parameters and answers in that provider's response shape, with this endpoint behind it. See how the drop-ins work.

ProviderHostPath
Google Maps Platformgapi.mygeocode.com/maps/api/timezone/json?location=lat,lng&timestamp=...&language=..
Bing Maps REST Servicesbing.mygeocode.com/REST/v1/TimeZone/{lat},{lon}?datetime=...
/REST/v1/TimeZone/?query=lat,lon
/REST/v1/TimeZone/List?timezoneStandard=iana|windows
/REST/v1/TimeZone/Convert?datetime=...&fromtz=...&desttz=...
LocationIQlocationiq.mygeocode.com/v1/timezone?lat=...&lon=...

Errors

400 invalid_request when lat or lon is missing or out of range, tz is not a known zone, there are more than 100 points, samples, rows or cols would produce more than 100, or timestamp is outside 1900 to 2100. 503 unavailable when the time zone service is temporarily unavailable; nothing is counted.