Time & Timezone Converter API
Get the current time in any timezone, convert between timezones and Unix timestamps (seconds or ms), with UTC offset and weekday for up to 30 zones.
The Time API returns the current time – or any time you give it – in UTC, as Unix seconds and milliseconds, and as local time in up to 30 IANA timezones at once (timezones=UTC,Asia/Ho_Chi_Minh,America/New_York). Each zone comes with its UTC offset (DST aware) and weekday. Without a timezone, the caller’s timezone detected by Cloudflare is used, falling back to UTC.
time accepts an ISO 8601 date with an offset or Z, Unix seconds (10 digits) or milliseconds (13 digits), or a local date-time without offset such as 2026-11-10 09:00, which is interpreted in from_timezone (default UTC). That makes it a quick timezone converter: "09:00 in Hanoi is what time in New York?"
Unknown timezone names do not fail the request; that zone just returns an error field. Add list=true to get the full list of supported IANA timezone names.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
time | query | string | no | ISO 8601 date, Unix seconds or milliseconds, or a local date-time without offset (default: now). | |
timezones | query | string | no | Comma-separated IANA timezones (max 30; alias timezone). Default: caller’s timezone, else UTC. | |
from_timezone | query | string | no | UTC | Timezone of time when it has no offset. |
list | query | boolean | no | false | Also return all supported timezone names. |
Example
curl "https://apibox.io.vn/v1/time?time=2026-11-10T09:00:00&from_timezone=Asia/Ho_Chi_Minh&timezones=UTC,Asia/Ho_Chi_Minh,America/New_York" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/time?time=2026-11-10T09:00:00&from_timezone=Asia/Ho_Chi_Minh&timezones=UTC,Asia/Ho_Chi_Minh,America/New_York', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/time?time=2026-11-10T09:00:00&from_timezone=Asia/Ho_Chi_Minh&timezones=UTC,Asia/Ho_Chi_Minh,America/New_York",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/time?time=2026-11-10T09:00:00&from_timezone=Asia/Ho_Chi_Minh&timezones=UTC,Asia/Ho_Chi_Minh,America/New_York');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"utc": "2026-11-10T02:00:00.000Z",
"unix": 1794276000,
"unix_ms": 1794276000000,
"zones": [
{
"timezone": "UTC",
"local": "2026-11-10T02:00:00+00:00",
"offset": "+00:00",
"weekday": "Tuesday"
},
{
"timezone": "Asia/Ho_Chi_Minh",
"local": "2026-11-10T09:00:00+07:00",
"offset": "+07:00",
"weekday": "Tuesday"
},
{
"timezone": "America/New_York",
"local": "2026-11-09T21:00:00-05:00",
"offset": "-05:00",
"weekday": "Monday"
}
]
}
Use cases
- Convert a Unix timestamp from logs into a readable local date
- Schedule meetings across Vietnam, Europe and the US
- Show the correct local time for users in different countries
- Get a reliable server time for clients with a wrong clock
FAQ
How do I convert a Unix timestamp to a date?
Call /v1/time?time=1794000000&timezones=Asia/Ho_Chi_Minh. 10-digit values are read as seconds, 13-digit values as milliseconds.
How do I convert a local time from one timezone to another?
Pass the local time without offset plus its zone: time=2026-11-10T09:00:00&from_timezone=Asia/Ho_Chi_Minh&timezones=America/New_York returns 2026-11-09T21:00:00-05:00.
Is daylight saving time handled?
Yes. Offsets come from the IANA timezone database for that exact date, so a zone like Europe/Paris returns +01:00 in winter and +02:00 in summer.
Related APIs
UUID Generator
Generate up to 1,000 UUID v4, time-ordered UUID v7, ULID, Nano ID or random hex IDs per request. Secure randomness, optional uppercase.
⏱Cron Expression Parser
Validate a cron expression and get its next run times in any timezone, with a plain-English description. Supports 5, 6 and 7-field cron syntax.
🎨Color Converter
Convert colours between HEX, RGB, HSL and CMYK, check WCAG contrast ratios and get complementary, triadic, analogous colours and shades in one call.