Returns a list of supported timezones. Can be given filter args if you're trying to match on search strings.
When reading the below documentation, it helps to understand that timezones are usally heirarchical, eg "Europe/London". Think of this as a master region and a sub-region, where "Europe" is the master region and "London" is the sub-region.
If you don't like the time zones names that we have used, please note that we didn't create them. Blame the standards body which did. We're just using what they produced.
| arg | required? | syntax | info |
|---|---|---|---|
prefix | N | string | if specified, limits results to timezones with this string as the master region and any additional search criteria apply only to what comes after it |
match_start | N | string | returned region names must start with this; excludes match_fuzzy and browse |
match_fuzzy | N | string | region names, or sub-region names, can start with this, or have it in the middle; can be multiple words; excludes match_start and browse |
browse | N | booleantrue | shows just the next region level; excludes match_fuzzy and match_start |
Note that prefix must exactly match a region or region/subregion (case insensitive match). So if you want to search for regions within Europe, you must supply "Europe" (or "Europe/") as the prefix. If you were to abbreviate the prefix (eg by supplying just "Eur") then the prefix will match nothing. Think of the prefix as a directory (or folder) name and you want to investigate the contents of that - you would need to specify the full name.
The browse switch allows you to see what's at your current level (the level being defined by the
prefix argument) as opposed to seeing the full list. If prefix is not defined, this is all of the
master regons, eg "Africa", "Asia", "Europe" etc. But if you define a prefix
as, say, "US", then your timezone list will be limited to just "US" (well, if it existed)
and any timezones directly within the master region "US/".
Requesting a list of timezones whose name starts "af".
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"match_start" : "af"
}
}
JSON example response:
{
"results" : {
"data" : [
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Asmera",
"Africa/Bamako",
"Africa/Bangui",
"Africa/Banjul",
"Africa/Bissau",
"Africa/Blantyre",
"Africa/Brazzaville",
"Africa/Bujumbura",
"Africa/Cairo",
"Africa/Casablanca",
"Africa/Ceuta",
"Africa/Conakry",
"Africa/Dakar",
"Africa/Dar_es_Salaam",
"Africa/Djibouti",
"Africa/Douala",
"Africa/El_Aaiun",
"Africa/Freetown",
"Africa/Gaborone",
"Africa/Harare",
"Africa/Johannesburg",
"Africa/Juba",
"Africa/Kampala",
"Africa/Khartoum",
"Africa/Kigali",
"Africa/Kinshasa",
"Africa/Lagos",
"Africa/Libreville",
"Africa/Lome",
"Africa/Luanda",
"Africa/Lubumbashi",
"Africa/Lusaka",
"Africa/Malabo",
"Africa/Maputo",
"Africa/Maseru",
"Africa/Mbabane",
"Africa/Mogadishu",
"Africa/Monrovia",
"Africa/Nairobi",
"Africa/Ndjamena",
"Africa/Niamey",
"Africa/Nouakchott",
"Africa/Ouagadougou",
"Africa/Porto-Novo",
"Africa/Sao_Tome",
"Africa/Timbuktu",
"Africa/Tripoli",
"Africa/Tunis",
"Africa/Windhoek"
],
"more_rows" : 0
},
"success" : 1
}
Requesting a list of timezones whose name starts "d" and the prefix is "africa".
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"match_start" : "d",
"prefix" : "africa"
}
}
JSON example response:
{
"results" : {
"data" : [
"Africa/Dakar",
"Africa/Dar_es_Salaam",
"Africa/Djibouti",
"Africa/Douala"
],
"more_rows" : 0
},
"success" : 1
}
Note that setting the prefix to "africa" means that all returned results must be within that master region, therefore
the match_start filter acts on the sub-region name that follows.
Also note that setting the prefix to "africa" means that the master region name must be this (case does not matter). If instead just "afric" had been supplied, nothing would have been returned, as there is no master region called "Afric".
A fuzzy match.
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"match_fuzzy" : "ar na"
}
}
JSON example response:
{
"results" : {
"data" : [
"America/Argentina/Catamarca",
"America/Araguaina",
"America/Argentina/Buenos_Aires",
"America/Argentina/ComodRivadavia",
"America/Argentina/Cordoba",
"America/Argentina/Jujuy",
"America/Argentina/La_Rioja",
"America/Argentina/Mendoza",
"America/Argentina/Rio_Gallegos",
"America/Argentina/Salta",
"America/Argentina/San_Juan",
"America/Argentina/San_Luis",
"America/Argentina/Tucuman",
"America/Argentina/Ushuaia",
"America/Punta_Arenas",
"Asia/Barnaul",
"US/Arizona",
"America/Indiana/Marengo",
"Indian/Antananarivo",
"US/Indiana-Starke"
],
"more_rows" : 0
},
"success" : 1
}
As multiple words were supplied to the fuzzy match, each one must be matched. Priority is given to results that have a region level starting with one of the words as opposed to just containing it (so matching on "ar" would prefer "US/Arizona" over "Asia/Barnaul" because "Ar" starts "Arizona" but appears in but does not start "Barnaul".
Suppling "us" as the prefix reduces the fuzzy search to just regions which match the fuzzy rules within that master region.
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"match_fuzzy" : "ar na",
"prefix" : "us"
}
}
JSON example response:
{
"results" : {
"more_rows" : 0,
"data" : [
"US/Arizona",
"US/Indiana-Starke"
]
},
"success" : 1
}
Using browse is like browsing through a file system. Results ending in a slash have sub-regions.
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"browse" : 1
}
}
JSON example response:
{
"success" : 1,
"results" : {
"more_rows" : 0,
"data" : [
"Africa/",
"America/",
"Antarctica/",
"Arctic/",
"Asia/",
"Atlantic/",
"Australia/",
"Brazil/",
"Canada/",
"CET",
"Chile/",
"CST6CDT",
"Cuba",
"EET",
"Egypt",
"Eire",
"EST",
"EST5EDT",
"Etc/",
"Europe/",
"GB",
"GB-Eire",
"GMT",
"GMT+0",
"GMT-0",
"GMT0",
"Greenwich",
"Hongkong",
"HST",
"Iceland",
"Indian/",
"Iran",
"Israel",
"Jamaica",
"Japan",
"Kwajalein",
"Libya",
"MET",
"Mexico/",
"MST",
"MST7MDT",
"Navajo",
"NZ",
"NZ-CHAT",
"Pacific/",
"Poland",
"Portugal",
"PRC",
"PST8PDT",
"ROC",
"ROK",
"Singapore",
"Turkey",
"UCT",
"Universal",
"US/",
"UTC",
"W-SU",
"WET",
"Zulu"
]
}
}
Browsing within America, define that in prefix ...
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"browse" : 1,
"prefix" : "america"
}
}
JSON example response:
{
"results" : {
"data" : [
"America/Adak",
"America/Anchorage",
"America/Anguilla",
"America/Antigua",
"America/Araguaina",
"America/Argentina/",
"America/Aruba",
"America/Asuncion",
"America/Atikokan",
"America/Atka",
"America/Bahia",
"America/Bahia_Banderas",
"America/Barbados",
"America/Belem",
"America/Belize",
"America/Blanc-Sablon",
"America/Boa_Vista",
"America/Bogota",
"America/Boise",
"America/Buenos_Aires",
"America/Cambridge_Bay",
"America/Campo_Grande",
"America/Cancun",
"America/Caracas",
"America/Catamarca",
"America/Cayenne",
"America/Cayman",
"America/Chicago",
"America/Chihuahua",
"America/Coral_Harbour",
"America/Cordoba",
"America/Costa_Rica",
"America/Creston",
"America/Cuiaba",
"America/Curacao",
"America/Danmarkshavn",
"America/Dawson",
"America/Dawson_Creek",
"America/Denver",
"America/Detroit",
"America/Dominica",
"America/Edmonton",
"America/Eirunepe",
"America/El_Salvador",
"America/Ensenada",
"America/Fortaleza",
"America/Fort_Nelson",
"America/Fort_Wayne",
"America/Glace_Bay",
"America/Godthab",
"America/Goose_Bay",
"America/Grand_Turk",
"America/Grenada",
"America/Guadeloupe",
"America/Guatemala",
"America/Guayaquil",
"America/Guyana",
"America/Halifax",
"America/Havana",
"America/Hermosillo",
"America/Indiana/",
"America/Indianapolis",
"America/Inuvik",
"America/Iqaluit",
"America/Jamaica",
"America/Jujuy",
"America/Juneau",
"America/Kentucky/",
"America/Knox_IN",
"America/Kralendijk",
"America/La_Paz",
"America/Lima",
"America/Los_Angeles",
"America/Louisville",
"America/Lower_Princes",
"America/Maceio",
"America/Managua",
"America/Manaus",
"America/Marigot",
"America/Martinique",
"America/Matamoros",
"America/Mazatlan",
"America/Mendoza",
"America/Menominee",
"America/Merida",
"America/Metlakatla",
"America/Mexico_City",
"America/Miquelon",
"America/Moncton",
"America/Monterrey",
"America/Montevideo",
"America/Montreal",
"America/Montserrat",
"America/Nassau",
"America/New_York",
"America/Nipigon",
"America/Nome",
"America/Noronha",
"America/North_Dakota/",
"America/Nuuk",
"America/Ojinaga",
"America/Panama",
"America/Pangnirtung",
"America/Paramaribo",
"America/Phoenix",
"America/Port-au-Prince",
"America/Porto_Acre",
"America/Porto_Velho",
"America/Port_of_Spain",
"America/Puerto_Rico",
"America/Punta_Arenas",
"America/Rainy_River",
"America/Rankin_Inlet",
"America/Recife",
"America/Regina",
"America/Resolute",
"America/Rio_Branco",
"America/Rosario",
"America/Santarem",
"America/Santa_Isabel",
"America/Santiago",
"America/Santo_Domingo",
"America/Sao_Paulo",
"America/Scoresbysund",
"America/Shiprock",
"America/Sitka",
"America/St_Barthelemy",
"America/St_Johns",
"America/St_Kitts",
"America/St_Lucia",
"America/St_Thomas",
"America/St_Vincent",
"America/Swift_Current",
"America/Tegucigalpa",
"America/Thule",
"America/Thunder_Bay",
"America/Tijuana",
"America/Toronto",
"America/Tortola",
"America/Vancouver",
"America/Virgin",
"America/Whitehorse",
"America/Winnipeg",
"America/Yakutat",
"America/Yellowknife"
],
"more_rows" : 0
},
"success" : 1
}
America/Argentina looks to have been further sub-divided into more sub-regions (it had an ending slash in the above results), so browsing that ...
JSON example request:
POST https://live.apicontrol.co.uk/1/json
{
"auth" : {
"username" : "YOURUSERNAME",
"password" : "YOURPASSWORD",
},
"func" : "timezone.list",
"args" : {
"browse" : 1,
"prefix" : "america/argentina"
}
}
JSON example response:
{
"success" : 1,
"results" : {
"data" : [
"America/Argentina/Buenos_Aires",
"America/Argentina/Catamarca",
"America/Argentina/ComodRivadavia",
"America/Argentina/Cordoba",
"America/Argentina/Jujuy",
"America/Argentina/La_Rioja",
"America/Argentina/Mendoza",
"America/Argentina/Rio_Gallegos",
"America/Argentina/Salta",
"America/Argentina/San_Juan",
"America/Argentina/San_Luis",
"America/Argentina/Tucuman",
"America/Argentina/Ushuaia"
],
"more_rows" : 0
}
}