← Back to blog

Free Timezone Conversion API for AI Agents

August 14, 2026 · Eric · 7 min read

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.

The three endpoints

EndpointMethodWhat it returns
/api/timezone/convertGETConvert a time (ISO 8601 or Unix timestamp) between two IANA zones
/api/timezone/nowGETCurrent date/time in any IANA zone, with ISO, Unix, and a short zone label
/api/timezone/listGETAll 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.

Convert a time between two zones

/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".

Step 1 — Convert with curl
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.

Step 2 — Same call in Python
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.

Get the current time anywhere

/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.

Step 3 — Current time in a zone
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.

List and search valid zones

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.

Step 4 — Search zones
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.

A real workflow: schedule across timezones

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.

  1. Look up the user's IANA zone (or let them pick from /api/timezone/list).
  2. When you already have an ISO instant, call /api/timezone/convert to preview how it appears to the user.
  3. For recurring local schedules, pass the IANA zone straight through to the scheduler's 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.

Why use an API instead of a library?

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.

Rate limits and getting more

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.

Try it in the Toolbox

Run the same tools in the browser, or call them from your agent with an API key.

Open toolbox