list-time-zone
Lists all supported time zones, sorted by name. GET https://opentz.noomad.org/v2.1/list-time-zone
Parameters
| Parameter | Required | Description |
|---|---|---|
key | Required | Your API key, from your account. |
format | Optional | xml (default) or json. |
callback | Optional | JavaScript function name for a JSONP response. |
fields | Optional | Comma-separated list (no spaces) of the fields to return. Default: all fields of the endpoint. |
country | Optional | Only the zones of this ISO 3166-1 alpha-2 country. |
zone | Optional | Zone name filter; * is a wildcard (*New*). |
Response
The default fields are countryCode, countryName, zoneName, gmtOffset
and timestamp; dst is available through fields.
| Field | Description |
|---|---|
zones | List of zones, each with the fields below. |
countryCode | ISO 3166-1 alpha-2 country code. |
countryName | Country name. |
zoneName | IANA time zone name. |
gmtOffset | Current offset from UTC in seconds. |
dst | true when daylight saving time is in effect now (boolean here, string in get-time-zone). |
timestamp | Current local time as a Unix number. |
Example
GET https://opentz.noomad.org/v2.1/list-time-zone?key=YOUR_API_KEY&format=json&country=NZ
{"status":"OK","message":"","zones":[{"countryCode":"NZ","countryName":"New Zealand","zoneName":"Pacific\/Auckland","gmtOffset":46800,"timestamp":1791589226},{"countryCode":"NZ","countryName":"New Zealand","zoneName":"Pacific\/Chatham","gmtOffset":49500,"timestamp":1791591926}]}