Anvil › Docs › /v1/time/convert
Time zone converter API: convert a local time to other zones
Give a wall-clock time and the zone it belongs to, list the zones you care about, and get the same moment in each of them. It also tells you when the time you asked for doesn't exist, which happens once a year in every zone with daylight saving.
/v1/time/convert?time=2026-11-03T09%3A30&from=Europe/London&to=Asia/Tokyo,America/Los_Angeles returns JSON. No key, CORS on, 60 requests a minute./v1/time/convert
Convert a local time between time zones. Change the values and press Send request to call the live API.
Parameters
| Name | Type | What it does | Default |
|---|---|---|---|
time required | string | ISO 8601 local time, Unix timestamp or 'now' | — |
from | string | Zone the time is in | UTC |
to required | string | Comma-separated target zones (up to 20) | — |
Example
Request:
GET https://api.oddlathe.com/v1/time/convert?time=2026-11-03T09%3A30&from=Europe/London&to=Asia/Tokyo,America/Los_Angeles
Response (generated by the real code when these docs were last built; random or time-based values will differ for you):
{
"input": {
"timezone": "Europe/London",
"iso": "2026-11-03T09:30:00+00:00",
"date": "2026-11-03",
"time": "09:30:00",
"weekday": "Tuesday",
"utc_offset": "+00:00",
"abbreviation": "GMT",
"dst": false,
"unix": 1793698200,
"iso_week": 45,
"day_of_year": 307
},
"nonexistent_local_time": false,
"results": [
{
"timezone": "Asia/Tokyo",
"iso": "2026-11-03T18:30:00+09:00",
"date": "2026-11-03",
"time": "18:30:00",
"weekday": "Tuesday",
"utc_offset": "+09:00",
"abbreviation": "JST",
"dst": false,
"unix": 1793698200,
"iso_week": 45,
"day_of_year": 307
},
{
"timezone": "America/Los_Angeles",
"iso": "2026-11-03T01:30:00-08:00",
"date": "2026-11-03",
"time": "01:30:00",
"weekday": "Tuesday",
"utc_offset": "-08:00",
…
Code examples
curl 'https://api.oddlathe.com/v1/time/convert?time=2026-11-03T09%3A30&from=Europe/London&to=Asia/Tokyo,America/Los_Angeles'const params = new URLSearchParams({
time: "2026-11-03T09:30",
from: "Europe/London",
to: "Asia/Tokyo,America/Los_Angeles"
});
const res = await fetch(`https://api.oddlathe.com/v1/time/convert?${params}`);
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();
console.log(data);import json, urllib.parse, urllib.request
params = urllib.parse.urlencode({"time": "2026-11-03T09:30", "from": "Europe/London", "to": "Asia/Tokyo,America/Los_Angeles"})
url = "https://api.oddlathe.com/v1/time/convert?" + params
# Send a User-Agent: the edge network refuses Python's default one.
req = urllib.request.Request(url, headers={"User-Agent": "my-script/1.0"})
with urllib.request.urlopen(req, timeout=10) as r:
data = json.load(r)
print(data)When it's useful
- Meeting invitations across offices
- Converting timestamps from logs or spreadsheets into local time
- Back-end checks before scheduling a notification in a user's zone
Good to know
- If the input has an offset (
2026-11-03T09:30+01:00) or is a Unix timestamp,fromonly affects how the input is described; the moment itself is fixed. - Skipped times: when clocks go forward, a local time like 01:30 on the last Sunday in March doesn't happen in London. The response sets
nonexistent_local_time: trueand shifts it forward, rather than guessing silently. - Up to 20 target zones per request, separated by commas.
A time with no offset is read as wall-clock time in 'from'. Times that don't exist (the hour skipped when clocks go forward) are flagged.
Errors
Errors are JSON like {"error": {"code": "…", "message": "…"}}. The ones this endpoint can return:
missing_param(400): a required parameter is missing or emptybad_param(400): a value is the wrong type or out of range (the message says which)bad_timezone(400): the zone isn't a known IANA namerate_limited(429): over 60 requests a minute; wait for Retry-After seconds
Questions
What happens to times that occur twice when clocks go back?
The first occurrence (the one still on summer time) is used, matching Python's default fold=0.
Can I convert to UTC?
Yes, include UTC in the to list.
Related endpoints
/v1/timeCurrent time (or any moment) in a time zone, with next DST change/v1/timezonesAll IANA time zone names with their current offset
Prefer a page to an API?
- Time zone meeting planner on Tooltern: same job, nothing leaves your browser.
- Guide: Unix timestamps: seconds or milliseconds?
Published · OpenAPI 3.1 spec · Limits and privacy