Epoch Precision Transcode

Convert signed Unix-epoch integer strings between seconds, milliseconds, microseconds, and nanoseconds with explicit rounding and loss reporting.

Custom requests cost 0.04 USDC on Base.

Download example JSON · OpenAPI · Source and usage

Pay with a browser wallet · Open example in checkout

POST a JSON request to /epoch-precision-transcode/v1/check with an x402 V2 client.

Worked example

Request

{
  "source": "ns",
  "target": "us",
  "rounding": "floor",
  "timestamps": [
    "1501",
    "-1501",
    "22000",
    "-1"
  ]
}

Result

{
  "converted": [
    {
      "source": "1501",
      "target": "1",
      "remainder_ns": "501"
    },
    {
      "source": "-1501",
      "target": "-2",
      "remainder_ns": "499"
    },
    {
      "source": "22000",
      "target": "22",
      "remainder_ns": "0"
    },
    {
      "source": "-1",
      "target": "-1",
      "remainder_ns": "999"
    }
  ],
  "lost_precision": 3
}

Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter