Skip to main content
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

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

{
  "type": "gateway:datetime",
  "parameters": {
    "timezones": ["Europe/London", "UTC"]
  }
}
ParameterTypeDefaultDescription
timezonesstring[]["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.
{
  "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:
{
  "usage": {
    "server_tool_use": {
      "datetime_requests": 1
    }
  }
}
Last modified on July 9, 2026