81trust / 100

Time Convert

by Time convert in Documents & files

x402 APIPassing, checked 2 h ago

Convert between epoch (s or ms), ISO 8601, and any IANA timezone. Give a value (epoch seconds or milliseconds, an ISO string, or 'now'), get every representation back: utc, epochSeconds, epochMillis and, with tz, timezone, localIso (ISO 8601 with the zone's offset, e.g. 2026-06-11T19:00:00+09:00), utcOffset and local (a display string). A bare number under 1e12 is read as seconds, otherwise as milliseconds.

POST https://agent402.tools/api/time-convert

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/time-convert" \
  -H "content-type: application/json" \
  -d '{"tz":"Asia/Tokyo","value":1781172000}'
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%2Fagent402.tools%2Fapi%2Ftime-convert
const res = await pay("https://agent402.tools/api/time-convert", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"tz":"Asia/Tokyo","value":1781172000}),
});
console.log(await res.json());

Example input

{
  "tz": "Asia/Tokyo",
  "value": 1781172000
}

Example output

{
  "epochMillis": 1781172000000,
  "epochSeconds": 1781172000,
  "local": "2026-06-11, 19:00:00 GMT+9",
  "localIso": "2026-06-11T19:00:00+09:00",
  "timezone": "Asia/Tokyo",
  "utc": "2026-06-11T10:00:00.000Z",
  "utcOffset": "+09:00"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402281 ms$0.001
7 h agoPassed402194 ms$0.001