OpenTZ

list-time-zone

Lists all supported time zones, sorted by name. GET https://opentz.noomad.org/v2.1/list-time-zone

Parameters

ParameterRequiredDescription
keyRequiredYour API key, from your account.
formatOptionalxml (default) or json.
callbackOptionalJavaScript function name for a JSONP response.
fieldsOptionalComma-separated list (no spaces) of the fields to return. Default: all fields of the endpoint.
countryOptionalOnly the zones of this ISO 3166-1 alpha-2 country.
zoneOptionalZone name filter; * is a wildcard (*New*).

Response

The default fields are countryCode, countryName, zoneName, gmtOffset and timestamp; dst is available through fields.

FieldDescription
zonesList of zones, each with the fields below.
countryCodeISO 3166-1 alpha-2 country code.
countryNameCountry name.
zoneNameIANA time zone name.
gmtOffsetCurrent offset from UTC in seconds.
dsttrue when daylight saving time is in effect now (boolean here, string in get-time-zone).
timestampCurrent 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}]}