# Date Math: Timestamp Detection & UTC Conversion

> Date Math: Timestamp Detection & UTC Conversion is a paid API for AI agents from date-math.datemath.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Detects and converts up to 100 mixed-format timestamps to UTC ISO 8601, flagging ambiguous values with alternative interpretations

## Facts

- Endpoint: POST https://date-math.datemath.workers.dev/v1/timestamp?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/date-math-timestamp-detection-utc-conversion-b22b6fca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3QoH4UtQCUNUyyusoJSXu

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 date-math-timestamp-detection-utc-conversion-b22b6fca -d '<json body>'
```

Example prompt: I have a CSV export with a mix of Unix timestamps, Excel serial dates, and slash dates like 03/04/2026 — can you convert all of them to UTC ISO 8601? Treat ambiguous slash dates as day-first (DMY) and use Europe/London as the reference timezone.

## When to prefer this

Choose this endpoint when you need to handle heterogeneous timestamp data from real-world sources (CSVs, logs, spreadsheets) that may mix Unix epoch variants, Excel serials, Windows FILETIME, and human-readable formats in the same dataset. It is especially valuable when ambiguity detection is important — e.g. distinguishing whether 45000 is an Excel date or Unix seconds, or whether 03/04 means March 4 or April 3. Prefer it over simple parsers when batch processing up to 100 values per call and when you need explicit alternative interpretations for ambiguous inputs.

## Known failure modes

- Array exceeds 100 items — API rejects with validation error
- Unrecognizable format returns ok:false for that individual entry
- Very large nanosecond integers passed as numbers may lose precision — must be passed as strings
- Invalid timezone string causes error or fallback to UTC
- Empty values array rejected due to minItems:1 constraint

## How this service works

Date Math: Detect and convert up to 100 mixed timestamps to UTC ISO 8601: Unix seconds/ms/µs/ns, Excel serial dates, Windows FILETIME, ISO 8601, RFC 2822, YYYY/MM/DD, month-name dates. Flags ambiguous values (03/04/2026: March 4 or 3 April? 45000: Excel date or Unix seconds?) with alternatives. Use for cleaning CSV, log and spreadsheet data.

## Output

A JSON object with an ok count, total count, and a results array where each entry includes the UTC ISO 8601 datetime, local datetime in the requested timezone, detected format name, unix_seconds, unix_ms, an ambiguous boolean, and an alternatives array listing other plausible interpretations when the value is ambiguous.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "values": {
   "type": "array",
   "items": {
    "type": [
     "string",
     "number"
    ]
   },
   "maxItems": 100,
   "minItems": 1,
   "description": "Timestamps as strings or numbers. Pass very large integers (ns) as strings."
  },
  "timezone": {
   "type": "string",
   "example": "Asia/Manila",
   "description": "Zone for values without an offset and for the local output (default UTC)"
  },
  "date_order": {
   "enum": [
    "MDY",
    "DMY"
   ],
   "type": "string",
   "description": "How to read ambiguous slash dates like 03/04/2026 (default MDY, with the other reading in alternatives)"
  },
  "numeric_format": {
   "enum": [
    "auto",
    "unix_seconds",
    "unix_ms",
    "unix_us",
    "unix_ns",
    "excel",
    "filetime"
   ],
   "type": "string",
   "default": "auto"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": 4,
  "count": 4,
  "results": [
   {
    "ok": true,
    "utc": "2025-11-07T07:20:00Z",
    "input": 1762500000,
    "local": "2025-11-07T15:20:00+08:00",
    "format": "unix_seconds",
    "unix_ms": 1762500000000,
    "ambiguous": false,
    "alternatives": [],
    "unix_seconds": 1762500000,
    "assumed_timezone": null
   }
  ],
  "timezone": "Asia/Manila"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/date-math-timestamp-detection-utc-conversion-b22b6fca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from date-math.datemath.workers.dev](https://www.zero.xyz/host/date-math.datemath.workers.dev/llms.txt)
