81trust / 100

Timezone Convert

by AgentUtility.ai in Documents & files

x402 APIPassing, checked 1 h ago

Converts a datetime from one IANA timezone to another with correct DST handling. ISO-8601 input: bare wall-time strings are interpreted in the from_tz, fully-qualified offsets are honored. DST is handled correctly (uses V8's built-in tzdata via Intl.DateTimeFormat). Returns both formatted strings, both UTC offsets, and the difference in hours. Use it for DST-aware time arithmetic, wall-clock to UTC conversion, or converting across cities.

POST https://x402.agentutility.ai/timezone-convert

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
144 ms typical, 144 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402.agentutility.ai/timezone-convert" \
  -H "content-type: application/json" \
  -d '{"datetime":"2026-05-08T12:00:00","from_tz":"America/Los_Angeles","to_tz":"Asia/Tokyo"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.agentutility.ai%2Ftimezone-convert
const res = await pay("https://x402.agentutility.ai/timezone-convert", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"datetime":"2026-05-08T12:00:00","from_tz":"America/Los_Angeles","to_tz":"Asia/Tokyo"}),
});
console.log(await res.json());

Example input

{
  "datetime": "2026-05-08T12:00:00",
  "from_tz": "America/Los_Angeles",
  "to_tz": "Asia/Tokyo"
}

Example output

{
  "from": {
    "datetime": "2026-05-08T12:00:00-07:00",
    "tz": "America/Los_Angeles",
    "utc_offset_minutes": -420
  },
  "source": "Intl.DateTimeFormat (built-in, IANA tzdata)",
  "to": {
    "datetime": "2026-05-09T04:00:00+09:00",
    "tz": "Asia/Tokyo",
    "utc_offset_minutes": 540
  },
  "utc_iso": "2026-05-08T19:00:00.000Z",
  "utc_offset_diff_hours": 16
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed4023.5 s$0.005
7 h agoPassed402144 ms$0.005