PlacesaddressoperationId timezone
GET/v1/timezone
The time zone at a point and its offsets at a timestamp.
Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.
Explained in Time zones and Enriching a coordinate.
Example
The zone and its offsets at an instant.
curl -G "https://api.oslew.com/v1/timezone" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'at=19.4326,-99.1332' \
--data-urlencode 'timestamp=1790175600'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.timezone("19.4326,-99.1332", timestamp=1790175600)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.timezone("19.4326,-99.1332", { timestamp: 1790175600 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 291
ratelimit-reset: 1
{
"at": [
19.4326,
-99.1332
],
"timestamp": 1790175600,
"tzid": "America/Mexico_City",
"utc_offset_s": -21600,
"raw_offset_s": -21600,
"dst_offset_s": 0,
"abbreviation": "CST",
"via": "interior",
"provenance": {
"name": "timezone-boundary-builder",
"release": "2026d",
"license": "ODbL-1.0"
},
"took_us": 144
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Query
| Name | Type | Description |
|---|---|---|
atqueryrequired | string | lat,lon. |
timestampquery | integer | Unix seconds; now when absent. |
Responses
200 — Zone and offsets; every field null when no zone holds the point.
abbreviationstring | nullrequiredatnumber[]requireddst_offset_sinteger | nullrequiredprovenanceSource | nullrequiredThe zone polygons' source, release and licence code. Terms: https://www.oslew.com/licensinglicensestringrequirednamestringrequiredreleasestringrequired
raw_offset_sinteger | nullrequiredtimestampintegerrequiredtook_usintegerrequiredtzidstring | nullrequiredIANA zone id.utc_offset_sinteger | nullrequiredSeconds to add to UTC: raw plus DST.viastring | nullrequiredinterior | boundary
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | Bad request. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
More examples
A zone that keeps daylight saving time
curl -G "https://api.oslew.com/v1/timezone" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'at=37.7929,-122.3971' \
--data-urlencode 'timestamp=1787756400'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.timezone("37.7929,-122.3971", timestamp=1787756400)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.timezone("37.7929,-122.3971", { timestamp: 1787756400 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 290
ratelimit-reset: 1
{
"at": [
37.7929,
-122.3971
],
"timestamp": 1787756400,
"tzid": "America/Los_Angeles",
"utc_offset_s": -25200,
"raw_offset_s": -28800,
"dst_offset_s": 3600,
"abbreviation": "PDT",
"via": "interior",
"provenance": {
"name": "timezone-boundary-builder",
"release": "2026d",
"license": "ODbL-1.0"
},
"took_us": 7482
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.