# x402 Timestamp Converter

> x402 Timestamp Converter is a paid API for AI agents from call402.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-28).

Converts between ISO date strings and Unix timestamps (seconds/milliseconds), returning multiple timezone-aware representations

## Facts

- Endpoint: POST https://call402.com/api/timestamp-convert?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-timestamp-converter-5235061f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aZusUniSDPidYP9LDzyeG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-timestamp-converter-5235061f -d '<json body>'
```

Example prompt: Convert October 21, 2025 to its Unix timestamp in both seconds and milliseconds, and also give me the equivalent UTC ISO string and Shanghai local time.

## When to prefer this

Use this endpoint when an AI agent needs rapid, deterministic conversion between ISO date strings and Unix epoch timestamps, especially when multi-timezone output (UTC + Asia/Shanghai) is needed simultaneously. Prefer this over building date math locally when the agent environment lacks reliable datetime libraries or when operating in a pay-per-call context on Base mainnet via x402.

## Known failure modes

- Missing or malformed input (neither date nor timestamp provided) results in a 400 error
- Invalid ISO date string format causes a parsing failure
- Ambiguous timestamps (seconds vs milliseconds not inferable) may produce incorrect conversions
- HTTP 402 returned on first request requiring USDC micropayment via x402 protocol before the response is served
- Network timeout if payment signature is not attached within the retry window

## How this service works

USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.

## Output

A JSON object containing the ISO UTC datetime string, Unix timestamp in milliseconds, Unix timestamp in seconds, Asia/Shanghai formatted local datetime, and an echo of the original Unix seconds input if provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "ISO date string"
  },
  "timestamp": {
   "type": "number",
   "description": "Unix seconds or milliseconds"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "iso_utc": "2025-10-21T00:00:00.000Z",
  "unix_ms": 1761004800000,
  "unix_seconds": 1761004800,
  "asia_shanghai": "2025-10-21 08:00:00",
  "unix_seconds_input_echo": 1761004800
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-timestamp-converter-5235061f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from call402.com](https://www.zero.xyz/host/call402.com/llms.txt)
