# Datetime Utility — Now, Convert, Add, Diff

> Datetime Utility — Now, Convert, Add, Diff is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Performs datetime operations including fetching the current time, converting between timezones, adding durations, and computing differences between two timestamps.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/datetime
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/datetime-utility-now-convert-add-diff-04bf905f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oU18XUCbddGtcXa-fXgYk

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 datetime-utility-now-convert-add-diff-04bf905f -d '<json body>'
```

Example prompt: What's the current time in America/New_York right now?

## When to prefer this

Use this endpoint when an AI agent needs reliable, pay-per-call datetime operations without API key setup — especially useful for timezone-aware scheduling, computing deadlines, or anchoring agent workflows to real-world time. Prefer over local computation when you need a consistent external time reference or timezone database.

## Known failure modes

- Invalid or unrecognized IANA timezone string causes error
- Missing required 'op' field returns validation error
- Invalid ISO or epoch time format causes parse failure
- Missing 'to' field when using 'diff' op causes error
- Missing 'amount' or 'unit' field when using 'add' op causes error
- Payment not settled or insufficient balance returns 402

## How this service works

Date/time math + timezones. op: now | convert | add | diff. Send { op, time?, timezone?, amount?, unit?, to? }.

## Output

Returns the computed datetime result: the current time (for 'now'), a timezone-converted timestamp (for 'convert'), a future/past timestamp after duration addition (for 'add'), or the numeric difference between two timestamps in the requested unit (for 'diff').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "op"
 ],
 "properties": {
  "op": {
   "type": "string",
   "description": "now, convert, add, or diff"
  },
  "to": {
   "type": "string",
   "description": "end time for diff"
  },
  "time": {
   "type": "string",
   "description": "ISO/epoch input time"
  },
  "unit": {
   "type": "string",
   "description": "s/m/h/d/w for add"
  },
  "amount": {
   "type": "number",
   "description": "amount for add"
  },
  "timezone": {
   "type": "string",
   "description": "IANA tz, e.g. America/New_York"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/datetime-utility-now-convert-add-diff-04bf905f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
