# agent402.tools Epoch/ISO Date Converter

> agent402.tools Epoch/ISO Date Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts between Unix epoch timestamps and ISO 8601 date strings in both directions, returning both representations plus UTC time and date components.

## Facts

- Endpoint: POST https://agent402.tools/api/epoch-convert
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-epoch-iso-date-converter-1369d627
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QHFnIqasFy3MxCwbZRzGX

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 agent402-tools-epoch-iso-date-converter-1369d627 -d '<json body>'
```

Example prompt: Convert the Unix epoch timestamp 1700000000 seconds to an ISO 8601 date string and also give me the UTC time and date components.

## When to prefer this

Use this endpoint when you need a quick, reliable bidirectional conversion between Unix epoch timestamps and ISO 8601 date strings, especially within an automated agent workflow that already handles x402 micropayments. Ideal when you need both representations plus UTC and date components in a single call.

## Known failure modes

- Invalid or missing input — neither epoch nor date provided returns an error
- Ambiguous unit — epoch provided without specifying seconds vs milliseconds may default to seconds
- Malformed ISO 8601 string returns a parse error
- Epoch value out of supported range returns an error
- Payment failure (x402) prevents the call from completing

## How this service works

Convert between Unix epoch timestamps and ISO 8601 date strings in both directions. Provide either an epoch (seconds or milliseconds) or an ISO date string. Returns both representations plus UTC and date components.

## Output

Returns both the Unix epoch (in seconds and/or milliseconds) and the ISO 8601 date string representation, plus UTC datetime and broken-down date components (year, month, day, etc.).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "ISO 8601 date string (alternative to epoch)"
  },
  "unit": {
   "type": "string",
   "description": "\"seconds\" (default) or \"milliseconds\" - interpretation of the epoch value"
  },
  "epoch": {
   "type": "number",
   "description": "Unix epoch timestamp (seconds or milliseconds)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "iso": "2026-06-21T00:00:00.000Z",
  "utc": "Sun, 21 Jun 2026 00:00:00 GMT",
  "epoch": {
   "seconds": 1782000000,
   "milliseconds": 1782000000000
  },
  "components": {
   "day": 21,
   "hour": 0,
   "year": 2026,
   "month": 6,
   "minute": 0,
   "second": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-epoch-iso-date-converter-1369d627/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
