Timezone lookup
The timezone of a point, and the offset in force there at a given moment.
GEThttps://api.mygeocode.com/v1/timezone
Parameters
| Parameter | Type | Description |
|---|---|---|
latrequired | number | -90 to 90. |
lonrequired | number | -180 to 180. |
timestampoptional | integer | Unix time in seconds. Default: now. Any moment from 1970 to 2100 is accepted; future offsets use the rules currently published. |
keyoptional | string | API key, if not sent as a header. |
Example
$ curl "https://api.mygeocode.com/v1/timezone?lat=-33.8688&lon=151.2093×tamp=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)).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}, timeout=5).json()
print(tz["timezone"], tz["utc_offset"], tz["dst"])Response
{
"status": "ok",
"lat": -33.8688,
"lon": 151.2093,
"timezone": "Australia/Sydney",
"abbreviation": "AEDT",
"utc_offset": "+11:00",
"utc_offset_seconds": 39600,
"dst": true,
"timestamp": 1767225600,
"local_time": "2026-01-01T11:00:00+11:00",
"country_code": "AU",
"next_transition": { "timestamp": 1775316000, "utc_offset": "+10:00", "dst": false }
}Response fields
| Field | Type | Description |
|---|---|---|
timezone | string | IANA name. In international waters, Etc/GMT+n or Etc/GMT-n (note the sign convention is inverted, as in IANA). |
abbreviation | string | Abbreviation at timestamp. For display only; not unique. |
utc_offset | string | ±HH:MM at timestamp. |
utc_offset_seconds | integer | The same as a number. |
dst | boolean | Daylight saving in effect at timestamp. |
timestamp | integer | The moment described. |
local_time | string | RFC 3339 local time with offset. |
country_code | string | ISO 3166-1 alpha-2, absent at sea. |
next_transition | object or null | The next offset change after timestamp, if the zone has one. |
Notes
- Store the IANA name and convert times with your platform's tz database. Use the offset fields for display or for systems without one.
- Rules are updated within a day of each IANA tzdata release. The release in use is shown in the changelog.
- On land borders the answer follows the boundary data; a point within a few metres of a border may resolve to either side.
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.
| Provider | Host | Path |
|---|---|---|
| Google Maps Platform | gapi.mygeocode.com | /maps/api/timezone/json?location=lat,lng×tamp=... |
| Bing Maps REST Services | bing.mygeocode.com | /REST/v1/TimeZone/{lat},{lon} |
| LocationIQ | locationiq.mygeocode.com | /v1/timezone?lat=...&lon=... |
Errors
400 invalid_request when lat or lon is missing or out of range, or timestamp is outside 1970 to 2100.