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
latrequirednumber-90 to 90.
lonrequirednumber-180 to 180.
timestampoptionalintegerUnix time in seconds. Default: now. Any moment from 1970 to 2100 is accepted; future offsets use the rules currently published.
keyoptionalstringAPI key, if not sent as a header.

Example

$ curl "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)).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

FieldTypeDescription
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.
utc_offsetstring±HH:MM at timestamp.
utc_offset_secondsintegerThe same as a number.
dstbooleanDaylight saving in effect at timestamp.
timestampintegerThe moment described.
local_timestringRFC 3339 local time with offset.
country_codestringISO 3166-1 alpha-2, absent at sea.
next_transitionobject or nullThe next offset change after timestamp, if the zone has one.

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=...
Bing Maps REST Servicesbing.mygeocode.com/REST/v1/TimeZone/{lat},{lon}
LocationIQlocationiq.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.