datetime_now
Returns the current date and time the moment it is called. Useful for agents that need to know the current time but whose host application does not inject it into the system prompt — a common gap in many LLM deployments.
The response always includes multiple representations at once so the agent can pick the one that fits its task without a follow-up call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timezone | string | No | IANA timezone name to convert the result into, e.g. "America/New_York" or "Europe/Berlin". Defaults to "UTC" when not provided. |
iso_format | string | No | Controls the UTC suffix style in iso8601. "offset" (default) produces +00:00; "z" produces a Z suffix. Only affects the UTC case — non-UTC timezones always use explicit offset notation regardless of this setting. |
Response
| Field | Type | Description |
|---|---|---|
iso8601 | string | Timestamp in RFC 3339 / ISO 8601 format with UTC offset (e.g. +00:00) or Z suffix, controlled by iso_format. |
unix | number | Seconds since the Unix epoch (UTC). Always a whole integer. |
human | string | Human-readable string with weekday, full date, time, and timezone abbreviation. |
timezone | string | The timezone that was applied. Always "UTC" when none was requested. |
utc_offset | string | UTC offset of the applied timezone at the current instant, e.g. "-04:00". |
date | string | Local calendar date in the output timezone in YYYY-MM-DD format. Reflects the local date, which may differ from UTC. |
weekday | string | Full English weekday name of the local date in the output timezone, e.g. "Monday". |
Examples
Current time in UTC (no timezone)
{}
Result:
{
"iso8601": "2026-04-13T14:30:45+00:00",
"unix": 1776090645,
"human": "Monday, April 13, 2026 at 2:30:45 PM UTC",
"timezone": "UTC",
"utc_offset": "+00:00",
"date": "2026-04-13",
"weekday": "Monday"
}
Current time in UTC with Z suffix
{
"iso_format": "z"
}
Result:
{
"iso8601": "2026-04-13T14:30:45Z",
"unix": 1776090645,
"human": "Monday, April 13, 2026 at 2:30:45 PM UTC",
"timezone": "UTC",
"utc_offset": "+00:00",
"date": "2026-04-13",
"weekday": "Monday"
}
Current time in a specific timezone
{
"timezone": "America/New_York"
}
Result (during Eastern Daylight Time, UTC−4):
{
"iso8601": "2026-04-13T10:30:45-04:00",
"unix": 1776090645,
"human": "Monday, April 13, 2026 at 10:30:45 AM EDT",
"timezone": "America/New_York",
"utc_offset": "-04:00",
"date": "2026-04-13",
"weekday": "Monday"
}
unix is always UTC-based and identical across all timezone responses for the same instant — use it for sorting, comparisons, and storage.
date and weekday reflect the local calendar date in the output timezone. The local date can differ from the UTC date in both directions:
- UTC− timezones (e.g.
America/New_York, UTC−4): before 4 AM UTC, the local clock still shows the previous day. - UTC+ timezones (e.g.
Europe/Berlin, UTC+2): after 10 PM UTC, the local clock has already crossed midnight into the next day.
Common IANA timezone names
| Region | IANA name | Example offset |
|---|---|---|
| US Eastern | America/New_York | −05:00 / −04:00 |
| US Pacific | America/Los_Angeles | −08:00 / −07:00 |
| UK / Ireland | Europe/London | +00:00 / +01:00 |
| Central Europe | Europe/Berlin | +01:00 / +02:00 |
| Japan | Asia/Tokyo | +09:00 |
| India | Asia/Kolkata | +05:30 |
| Australia Eastern | Australia/Sydney | +10:00 / +11:00 |
| UTC | UTC | +00:00 |
A full list of valid IANA timezone names is available at IANA Time Zone Database.
Errors
Each failure carries a precise code in the response. Argument-schema and server errors are JSON-RPC protocol errors; a rejected value is returned as a tool result with isError: true (so the agent can read the code and self-correct).
| Code | When | Delivered as |
|---|---|---|
invalid_arguments | An argument is missing or the wrong type. | protocol error (invalid_params) |
invalid_timezone | The timezone value is not a recognized IANA timezone name. | tool error (isError) |
internal_error | An unexpected server error. | protocol error (internal_error) |
Notes
- The tool reads the system clock at call time; repeated calls will return different values.
- Offsets for timezones that observe daylight saving time (e.g.
America/New_York) are calculated automatically based on the current date — no manual DST handling is needed. - The
humanfield uses a fixed English locale. It is intended for display or prose inclusion, not for machine parsing. - All timestamps are based on the proleptic Gregorian calendar.
iso_format: "z"only changes the UTC suffix. Responses for non-UTC timezones always include an explicit numeric offset (e.g.-04:00) regardless of this setting.