Timezones are one of those problems that looks trivial until it bites you. An AI agent that schedules a webhook for 09:00, stamps a log with Date.now(), or converts a customer's "next Tuesday" into an actual moment in time has to get the math right — across DST changes, IANA zone names, and offsets that vary by season.
Instead of hand-rolling offset tables (which are wrong half the year), you can call a free timezone API. Agent Media Tools exposes three endpoints that do the heavy lifting with the same Intl.DateTimeFormat machinery your runtime already trusts: convert a time between any two IANA zones, get the current time in any zone, and search the full list of valid zone names. No API key is required for the free tier, and the endpoints return plain JSON that works from curl, Python, or any agent toolchain.
| Endpoint | Method | What it returns |
|---|---|---|
/api/timezone/convert | GET | Convert a time (ISO 8601 or Unix timestamp) between two IANA zones |
/api/timezone/now | GET | Current date/time in any IANA zone, with ISO, Unix, and a short zone label |
/api/timezone/list | GET | All IANA zone names, optionally filtered by a search string |
All three live under https://agentmediatools.com/api/, return JSON, and validate zone names for you — a typo like America/New_Yorkk comes back as a clear error instead of a silent wrong answer. The free tier allows 10 successful tool calls per IP per day anonymously, and a free account (no card required) raises that to 25 per day.
/api/timezone/convert takes from, to, and an optional time parameter. Supply an unambiguous ISO 8601 instant with Z or an explicit offset, such as 2026-08-14T18:00:00Z. The endpoint renders that same instant in both zones; from labels the input rendering rather than assigning a timezone to an offset-free wall-clock string. If you omit time, it formats "right now".
curl "https://agentmediatools.com/api/timezone/convert?from=America/New_York&to=Asia/Tokyo&time=2026-08-14T18:00:00Z" | python3 -m json.tool
{
"success": true,
"input": {
"utc": "2026-08-14T18:00:00.000Z",
"timezone": "America/New_York",
"local": "2026-08-14, 14:00:00"
},
"output": {
"timezone": "Asia/Tokyo",
"local": "2026-08-15, 03:00:00",
"full": "Saturday, August 15, 2026 at 3:00:00 AM GMT+9"
},
"utc_timestamp": 1786730400000
}
Notice the response includes the UTC instant (utc_timestamp) alongside both local renderings. That's the field you want to persist — it's unambiguous and DST-safe. The human-readable strings are for display and debugging.
import requests
r = requests.get("https://agentmediatools.com/api/timezone/convert", params={
"from": "America/New_York",
"to": "Asia/Tokyo",
"time": "2026-08-14T18:00:00Z",
})
data = r.json()
print(data["output"]["local"]) # 2026-08-15, 03:00:00
print(data["utc_timestamp"]) # 1786730400000
Because the API validates both zone names before converting, you can trust the error path too: send from=Europe/Paris&to=Not/AZone and you'll get {"success": false, "error": "Invalid target timezone: Not/AZone"} — useful when an agent is accepting zone names from user input.
/api/timezone/now returns the current moment in any IANA zone, plus a short zone label such as GMT+2 — handy for "what time is it for this user?" style checks without loading a tz database.
curl "https://agentmediatools.com/api/timezone/now?tz=Europe/Berlin"
{
"success": true,
"timezone": "Europe/Berlin",
"datetime": "Friday, August 14, 2026 at 10:42:13 PM GMT+2",
"iso": "2026-08-14T20:42:13.815Z",
"unix": 1786740133815,
"utc_offset": "GMT+2"
}
The unix field is milliseconds since epoch, matching JavaScript's Date.now() convention. If you omit tz, it defaults to UTC — a handy shortcut for getting a canonical "now" in one call.
Agents that let users pick a timezone need the canonical list of valid names — not a hardcoded array that drifts out of date. /api/timezone/list returns every IANA zone supported by the runtime's Intl implementation, and accepts an optional search parameter for filtering.
curl "https://agentmediatools.com/api/timezone/list?search=Kolkata" | python3 -m json.tool
{
"success": true,
"count": 1,
"total": 410,
"timezones": ["Asia/Kolkata"]
}
No search parameter returns the full list — about 410 zones depending on the runtime build — which you can cache and reuse for autocomplete UIs or agent tool schemas.
Here's the pattern that makes this API more than a toy: an agent that schedules recurring HTTP tasks (Agent Media Tools has a durable scheduler that accepts a cron expression plus a timezone) can resolve "run at 9 AM user time" into a correct UTC cron without guessing offsets.
/api/timezone/list)./api/timezone/convert to preview how it appears to the user.timezone field so the scheduler can apply its timezone rules.You can also pair it with the free cron expression validator at /api/cron-validate, which returns the next five run times for any expression — a great sanity check before a schedule goes live.
If you're already in Node or Python, your standard library can do most of this locally. The API earns its keep in three situations:
And because these endpoints are plain GETs with no signup on the free tier, they're trivially safe for agents to call — no secrets to leak, no SDK to install, just a URL.
The free tier is 10 successful tool calls per IP per day anonymously, and 25 per day with a free account. If you're building an agent or service that needs more headroom, a free account is the first step; agent API keys use their own daily limit and unlock the full toolbox of 70+ tools. There's no card required to start.
Run the same tools in the browser, or call them from your agent with an API key.
Open toolbox