# time-format

> time-format is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Formats an ISO 8601 datetime string using a strftime pattern and returns the formatted result.

## Facts

- Endpoint: GET https://x402.agentindex.world/time/format?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/time-format-163c8645
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PdUp1ujOTDFtwDjgG6Exw

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 time-format-163c8645
```

Example prompt: Format the datetime '2025-06-15T14:30:00Z' using the strftime pattern '%A, %B %d %Y at %I:%M %p' so it reads as a friendly human-readable string.

## When to prefer this

Use this endpoint when you need server-side, deterministic strftime-based datetime formatting without relying on client-side locale libraries. Ideal for agents that need to display timestamps in user-facing content, generate filenames, or produce consistently formatted date labels across environments where local timezone/locale libraries may not be available.

## Known failure modes

- Invalid ISO 8601 datetime string — returns error indicating unparseable datetime
- Invalid or unrecognized strftime pattern tokens — may return error or pass them through literally
- Missing required parameters (pattern or datetime) — returns validation error
- Edge cases like leap years or timezone offsets may behave unexpectedly depending on server handling

## How this service works

Format an ISO 8601 datetime using a strftime pattern.

## Output

Returns the input ISO 8601 datetime string formatted according to the provided strftime pattern — e.g. '2025-06-15T14:30:00Z' with pattern '%B %d, %Y' yields 'June 15, 2025'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pattern": {
   "type": "string",
   "title": "Pattern"
  },
  "datetime": {
   "type": "string",
   "title": "Datetime"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "formatted": "2026/03/15 14:30"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/time-format-163c8645/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
