/api/time/now
MCP tool time_now Returns the current time from the server's clock when the request is processed (millisecond resolution) as UTC, Unix seconds and milliseconds, and, for each requested zone, the local ISO 8601 time with offset, weekday, ISO week, day of year, zone abbreviation, UTC offset and whether DST is in effect. Use it instead of guessing today's date.
Browser version (runs locally): Time & Time Zones.
Try it
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
zones | list of strings | UTC | Comma-separated (or JSON array) zones: IANA names (America/New_York, Europe/Paris, Asia/Tokyo), UTC, or fixed offsets (+05:30, UTC-03:00). Abbreviations like PST or CET are rejected as ambiguous. At most 20. |
formats | list of rfc2822 | http | sql | iso_basic | iso_week_date | iso_ordinal | human | — | Extra renderings added to each zone's formatted map: rfc2822 (Tue, 13 Oct 2026 14:30:00 +0200), http (HTTP-date, always GMT), sql (2026-10-13 14:30:00.000 +02:00), iso_basic (20261013T143000+0200), iso_week_date (2026-W42-2), iso_ordinal (2026-286), human (Tuesday, October 13, 2026 at 2:30:00 PM GMT+2). |
pattern | string (≤ 100 chars) | — | Custom format using Luxon tokens (e.g. yyyy-MM-dd HH:mm ZZZZ; quote literal text in single quotes). Added to formatted.pattern. English names. |
Also accepted on every endpoint: format (json | text).
Parameters may come from the query string, a JSON object body, an urlencoded or multipart form,
or (for input) a text/plain body.
Global parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format | json | text | json | json returns the documented object. text returns only the primary value as text/plain (see "Text output"). |
Response 200 application/json
| Field | Type | Description |
|---|---|---|
instant | object | |
instant.utc | string | The instant in UTC, ISO 8601 with Z. |
instant.unix_seconds | integer | Whole seconds since 1970-01-01T00:00:00Z, rounded down (floor). |
instant.unix_milliseconds | integer | Milliseconds since 1970-01-01T00:00:00Z. |
zones | array of object | One entry per requested zone, in request order. |
zones[].zone | string | Zone name as resolved: IANA name (letter case corrected), UTC, or UTC±HH:MM. |
zones[].iso | string | ISO 8601 / RFC 3339 with the UTC offset (Z for UTC). Milliseconds appear only when non-zero. |
zones[].local | string | Wall-clock date-time in the zone without an offset, YYYY-MM-DDTHH:mm:ss[.SSS]. |
zones[].date | string | Local calendar date, YYYY-MM-DD. |
zones[].time | string | Local time, HH:mm:ss (24-hour), with .SSS only when milliseconds are non-zero. |
zones[].offset | string | UTC offset, ±HH:MM. |
zones[].offset_minutes | integer | UTC offset in minutes (east positive), e.g. -240 for UTC-04:00. |
zones[].abbreviation | string | Short zone name as Intl (en-US) prints it: EDT, PST, or GMT+2 where English has no common abbreviation. |
zones[].offset_name | string | Long zone name, e.g. Eastern Daylight Time. |
zones[].dst | boolean | True when daylight saving time is in effect at this instant. |
zones[].weekday | string | English weekday name, e.g. Tuesday. |
zones[].weekday_number | integer | ISO 8601 weekday: 1 = Monday … 7 = Sunday. |
zones[].iso_week | string | ISO 8601 week, YYYY-Www (the week-numbering year can differ from the calendar year near 1 January). |
zones[].iso_week_year | integer | ISO 8601 week-numbering year. |
zones[].iso_week_number | integer | ISO 8601 week number, 1-53. |
zones[].day_of_year | integer | Ordinal day of the year, 1-366. |
zones[].formatted | map of string | Extra renderings requested with formats (keyed by format name) and pattern (key pattern). Empty when none were requested. |
warnings | array of string | Warnings about the zones given (fixed offsets, legacy or inverted names). |
Text output (format=text, text/plain): The ISO 8601 time in each requested zone, one per line.
Errors
Errors are JSON: {"error": "<message>", "code": "<code>", "param": "<name>"?}.
| Status | Code | When |
|---|---|---|
400 | invalid_parameter | A zone is unknown, an abbreviation, or local. |
400 | missing_parameter | A required parameter is absent. |
400 | unknown_parameter | A parameter name is not in the table above (typos are rejected, not ignored). |
413 | payload_too_large | The request body exceeds 1 MiB. |
405 | method_not_allowed | A method other than GET, POST or OPTIONS. |
Behaviour
- Not idempotent: the result can differ between calls (time, randomness, or a live network check).
-
Requires a client ID and secret (authentication). Each call is
recorded as one metadata row against your client ID; inputs and outputs are never stored or
logged. Responses carry
cache-control: no-store. - CORS: any origin may call this endpoint from a browser, using your credentials.
Examples
Responses below were produced by running each request through this code at build time. Long strings are shortened.
Now in UTC
curl 'https://util.caruana.me/api/time/now?'
Response 200
{
"instant": {
"utc": "2026-10-15T00:27:37.280Z",
"unix_seconds": 1792024057,
"unix_milliseconds": 1792024057280
},
"zones": [
{
"zone": "UTC",
"iso": "2026-10-15T00:27:37.280Z",
"local": "2026-10-15T00:27:37.280",
"date": "2026-10-15",
"time": "00:27:37.280",
"offset": "+00:00",
"offset_minutes": 0,
"abbreviation": "UTC",
"offset_name": "UTC",
"dst": false,
"weekday": "Thursday",
"weekday_number": 4,
"iso_week": "2026-W42",
"iso_week_year": 2026,
"iso_week_number": 42,
"day_of_year": 288,
"formatted": {}
}
],
"warnings": []
}
Same call as an MCP tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "time_now",
"arguments": {}
}
}Now in several zones, with RFC 2822
curl 'https://util.caruana.me/api/time/now?zones=UTC%2CAmerica%2FNew_York%2CAsia%2FKolkata&formats=rfc2822'
Response 200
{
"instant": {
"utc": "2026-10-15T00:27:37.283Z",
"unix_seconds": 1792024057,
"unix_milliseconds": 1792024057283
},
"zones": [
{
"zone": "UTC",
"iso": "2026-10-15T00:27:37.283Z",
"local": "2026-10-15T00:27:37.283",
"date": "2026-10-15",
"time": "00:27:37.283",
"offset": "+00:00",
"offset_minutes": 0,
"abbreviation": "UTC",
"offset_name": "UTC",
"dst": false,
"weekday": "Thursday",
"weekday_number": 4,
"iso_week": "2026-W42",
"iso_week_year": 2026,
"iso_week_number": 42,
"day_of_year": 288,
"formatted": {
"rfc2822": "Thu, 15 Oct 2026 00:27:37 +0000"
}
},
{
"zone": "America/New_York",
"iso": "2026-10-14T20:27:37.283-04:00",
"local": "2026-10-14T20:27:37.283",
"date": "2026-10-14",
"time": "20:27:37.283",
"offset": "-04:00",
"offset_minutes": -240,
"abbreviation": "EDT",
"offset_name": "Eastern Daylight Time",
"dst": true,
"weekday": "Wednesday",
"weekday_number": 3,
"iso_week": "2026-W42",
"iso_week_year": 2026,
"iso_week_number": 42,
"day_of_year": 287,
"formatted": {
"rfc2822": "Wed, 14 Oct 2026 20:27:37 -0400"
}
},
{
"zone": "Asia/Kolkata",
"iso": "2026-10-15T05:57:37.283+05:30",
"local": "2026-10-15T05:57:37.283",
"date": "2026-10-15",
"time": "05:57:37.283",
"offset": "+05:30",
"offset_minutes": 330,
"abbreviation": "GMT+5:30",
"offset_name": "India Standard Time",
"dst": false,
"weekday": "Thursday",
"weekday_number": 4,
"iso_week": "2026-W42",
"iso_week_year": 2026,
"iso_week_number": 42,
"day_of_year": 288,
"formatted": {
"rfc2822": "Thu, 15 Oct 2026 05:57:37 +0530"
}
}
],
"warnings": []
}
Same call as an MCP tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "time_now",
"arguments": {
"zones": [
"UTC",
"America/New_York",
"Asia/Kolkata"
],
"formats": [
"rfc2822"
]
}
}
}