---
title: "Convert between Unix timestamps and human-readable date/time formats. Accepts Unix epoch (in seconds or milliseconds), ISO 8601 strings, or 'now' for the current time. Returns both Unix seconds and milliseconds, ISO 8601 UTC string, date and time components, day of the week, relative time description ('2 hours ago'), and past/future indicator. Auto-detects whether a numeric input is seconds or milliseconds based on magnitude. Essential for debugging logs, API timestamps, cron scheduling, and time zone conversions."
method: POST
path: "/api/timestamp_converter"
tags: ["general"]
---

# Convert between Unix timestamps and human-readable date/time formats. Accepts Unix epoch (in seconds or milliseconds), ISO 8601 strings, or 'now' for the current time. Returns both Unix seconds and milliseconds, ISO 8601 UTC string, date and time components, day of the week, relative time description ('2 hours ago'), and past/future indicator. Auto-detects whether a numeric input is seconds or milliseconds based on magnitude. Essential for debugging logs, API timestamps, cron scheduling, and time zone conversions.

`POST /api/timestamp_converter`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/timestamp_converter`
- Auth: none declared

## Request body

- object
  - `value` string, required: A timestamp to convert. Accepts Unix epoch (seconds or milliseconds), ISO 8601 string (e.g. '2024-01-15T10:30:00Z'), or 'now' for the current time.

## Response `200`

Computed result for timestamp_converter

- object
  - `result` object, required
    - `unix_seconds` number, required: Unix timestamp in seconds since epoch (Jan 1 1970 00:00:00 UTC).
    - `unix_milliseconds` number, required: Unix timestamp in milliseconds since epoch.
    - `iso_8601` string, required: ISO 8601 formatted string in UTC (e.g. '2024-01-15T10:30:00.000Z').
    - `iso_date` string, required: Date portion only (YYYY-MM-DD).
    - `iso_time` string, required: Time portion only (HH:MM:SS).
    - `day_of_week` string, required: Day of the week (e.g. 'Monday').
    - `relative` string, required: Human-readable relative time (e.g. '2 hours ago', 'in 3 days').
    - `is_past` boolean, required: True if the timestamp is in the past.
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
