# GET /time/convert: $0.001 per call

Convert a date and time between time zones, daylight saving handled. Pass ?time=2026-10-01T15:00&from=Europe/London&to=America/New_York,Tokyo (time can be 15:00, 3:30pm or now). Zones: IANA names, big cities, UTC offsets or unambiguous abbreviations (EST, JST). Returns local time, weekday, UTC offset, abbreviation, DST flag and day shift for each zone.

- **Price:** $0.001 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** not cached
- **Data sources:** computed locally (IANA tzdata)
- **Lane:** Time, holidays & weather ([OpenAPI](/openapi/world.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/time-convert](/sample/time-convert). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/time-convert"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/time/convert?time=2026-10-01T15%3A00&from=Europe%2FLondon&to=America%2FNew_York%2CTokyo"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/time/convert?time=2026-10-01T15%3A00&from=Europe%2FLondon&to=America%2FNew_York%2CTokyo");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("time-convert", {"time":"2026-10-01T15:00","from":"Europe/London","to":"America/New_York,Tokyo"});
```

## Inputs

- `time` (string): Local time in the 'from' zone: 2026-10-01T15:00, 2026-10-01, 15:00, 3:30pm, or now (default).
- `from` (string; default `UTC`): Zone the time is in: IANA name, city, UTC offset (UTC+5:30) or unambiguous abbreviation.
- `to` **(required)** (string): One or more zones to convert to, comma-separated (up to 10).

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

Example only: the shape of an answer, with placeholder addresses and made-up figures. It is not data about any real token or wallet; call the service (or its free sample) for real results.

```json
{
  "utc": "2026-10-01T14:00:00Z",
  "from": {
    "asked": "Europe/London",
    "zone": "Europe/London",
    "local": "2026-10-01T15:00:00+01:00",
    "date": "2026-10-01",
    "clock": "15:00",
    "weekday": "Thursday",
    "utcOffset": "+01:00",
    "abbreviation": "BST",
    "isDst": true,
    "dayShift": 0
  },
  "to": [
    {
      "asked": "America/New_York",
      "zone": "America/New_York",
      "local": "2026-10-01T10:00:00-04:00",
      "date": "2026-10-01",
      "clock": "10:00",
      "weekday": "Thursday",
      "utcOffset": "-04:00",
      "abbreviation": "EDT",
      "isDst": true,
      "dayShift": 0
    },
    {
      "asked": "Tokyo",
      "zone": "Asia/Tokyo",
      "local": "2026-10-01T23:00:00+09:00",
      "date": "2026-10-01",
      "clock": "23:00",
      "weekday": "Thursday",
      "utcOffset": "+09:00",
      "abbreviation": "UTC+09:00",
      "isDst": null,
      "dayShift": 0
    }
  ],
  "note": null,
  "source": "IANA time zone database (tzdata) built into the runtime; computed, not looked up"
}
```

## Related

- [GET /holidays](/services/holidays) ($0.002): Public holidays for 100+ countries and years, with regional holidays (e.g.
- [GET /weather](/services/weather) ($0.002): Weather now and forecast for any latitude/longitude on Earth: temperature, feels-like, wind, humidity, cloud, pressure, rain next hour, the next 12 hours, and d
- [GET /postcode/lookup](/services/postcode-lookup) ($0.001): Postal code to place name, region and latitude/longitude in about 60 countries (US ZIP codes, UK postcodes, Canada, Germany, France, India, Japan, Australia...)

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).