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. AI Stats returns the resolved timezone and current timestamp to the model, then the model writes the final answer.

Quick start

curl https://api.phaseo.app/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": {
          "timezone": "Asia/Tokyo"
        }
      }
    ]
  }'

Configuration

{
  "type": "gateway:datetime",
  "parameters": {
    "timezone": "Europe/London"
  }
}
ParameterTypeDefaultDescription
timezonestringUTCIANA timezone name, such as Europe/London, America/New_York, or Asia/Tokyo.
timezone can also be provided as a top-level shortcut on the tool object.

Tool result

The tool result includes the current ISO timestamp and the resolved timezone. The model uses that result to answer the user.

Usage

Datetime calls increment:
{
  "usage": {
    "server_tool_use": {
      "datetime_requests": 1
    }
  }
}
Last modified on June 11, 2026