GET/v1/countries/{code}/timezones
The IANA time zones a country uses, with current offsets
PARAMETERS
- codepath · stringREQUIRED
- ISO 3166-1 alpha-2e.g. CA
REQUEST
curl "https://api.apialmanac.com/v1/countries/CA/timezones" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/countries/CA/timezones", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/countries/CA/timezones", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"country": "CA",
"count": 2,
"timezones": [
{
"zone": "America/Toronto",
"comment": "Eastern - ON & QC (most areas)",
"offset": "-04:00",
"abbreviation": "EDT"
},
{
"zone": "America/Vancouver",
"comment": "Pacific - BC (most areas)",
"offset": "-07:00",
"abbreviation": "PDT"
}
]
}