# Epoch to ISO

`epoch-to-iso` · version 1.0.0 · Other utilities · free, no key needed

Convert an exact integer Unix timestamp in seconds, milliseconds, microseconds or nanoseconds to RFC 3339 UTC.

**Use when you need to: unix timestamp to ISO UTC · convert epoch seconds to date · epoch milliseconds to RFC 3339.**

## Decide before calling

Read the [versioned contract](/v1/tools/epoch-to-iso/versions/1.0.0) and the supported scope below. Reuse `epoch-to-iso@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `epoch-to-iso@1.0.0` for unix timestamp to ISO UTC. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- unix timestamp to ISO UTC
- convert epoch seconds to date
- epoch milliseconds to RFC 3339
- turn nanosecond timestamp into UTC
- format unix time as ISO string
- microseconds since 1970 to timestamp

## Not supported

- local timezone conversion
- guessing a timestamp unit
- leap-second timestamps

## Behavior

- Interpret the integer using the selected exact power-of-ten unit; binary floating point is never used.
- Use POSIX seconds since the Epoch with every day exactly 86400 seconds; leap seconds are not represented.
- Return UTC with Z and 0, 3, 6 or 9 fractional digits according to the input unit.

## Input

- `epoch` (string, required): min length 1; max length 22; pattern `^-?[0-9]+$`
- `unit` (one of "seconds", "milliseconds", "microseconds", "nanoseconds", required)

## Output

- `iso` (string, required): min length 20; max length 30
- `standard_version` (constant "POSIX.1-2024 4.19; RFC 3339", required)

## Limits

- max input bytes: 54

## Example

Request input:

```json
{
  "epoch": "0",
  "unit": "seconds"
}
```

Response:

```json
{
  "result": {
    "iso": "1970-01-01T00:00:00Z",
    "standard_version": "POSIX.1-2024 4.19; RFC 3339"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "epoch-to-iso",
  "version": "1.0.0",
  "input": {
    "epoch": "0",
    "unit": "seconds"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/epoch-to-iso/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"epoch":"0","unit":"seconds"}'
```

The machine-readable contract is at [/v1/tools/epoch-to-iso/versions/1.0.0](/v1/tools/epoch-to-iso/versions/1.0.0).

### CLI

```sh
node cli.mjs run epoch-to-iso 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Bytes format human](/tools/bytes-format-human): Format an exact byte count as both SI and IEC strings and return the rounding mode used.
- [Bytes parse human](/tools/bytes-parse-human): Parse an SI or IEC byte-size string and return an exact integer byte count using explicit rounding.
- [Data rate convert](/tools/data-rate-convert): Convert bit or byte rates across SI and IEC prefixes and return an exact reduced rational.
- [Identifier case convert](/tools/identifier-case-convert): Convert an ASCII identifier to a requested common case and return the converted identifier.
- [Rtf to markdown](/tools/rtf-to-markdown): Convert an 8 KiB ANSI-1252 RTF text subset to escaped Markdown; unsupported Word features are refused.
- [Base64url decode](/tools/base64url-decode): Decode base64url to UTF-8 text or lowercase hex and return the requested value.
