> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Datetime Server Tool

> Give models the current date and time in one or more timezones.

Use `gateway:datetime` when a prompt depends on the current date, day of week, time, or timezone.

The model decides when to call the tool. Phaseo returns the resolved timezones and current timestamps to the model, then the model writes the final answer.

## Quick start

```bash theme={null}
curl https://api.phaseo.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5-nano",
    "messages": [
      { "role": "user", "content": "What day of the week is it in Tokyo?" }
    ],
    "tools": [
      {
        "type": "gateway:datetime",
        "parameters": {
          "timezones": ["Asia/Tokyo", "UTC"]
        }
      }
    ]
  }'
```

## Configuration

```json theme={null}
{
  "type": "gateway:datetime",
  "parameters": {
    "timezones": ["Europe/London", "UTC"]
  }
}
```

| Parameter   | Type      | Default   | Description                                                                                 |
| ----------- | --------- | --------- | ------------------------------------------------------------------------------------------- |
| `timezones` | string\[] | `["UTC"]` | Up to 5 IANA timezone names to return in one tool call, such as `["Europe/London", "UTC"]`. |

## Tool result

The tool result contains one entry per requested timezone.

```json theme={null}
{
  "timezones": [
    {
      "timezone": "Europe/London",
      "datetime": "2026-07-03T10:00:00.123+01:00"
    },
    {
      "timezone": "UTC",
      "datetime": "2026-07-03T09:00:00.123+00:00"
    }
  ]
}
```

## Usage

Datetime calls increment:

```json theme={null}
{
  "usage": {
    "server_tool_use": {
      "datetime_requests": 1
    }
  }
}
```

## Related

* [Server Tools](./index)
* [Tool Calling](../tool-calling)
