Unix Timestamp Converter API
Convert a Unix timestamp (seconds or milliseconds, detected automatically) to a date.
POST /api/v1/tools/unix-timestamp-converterMCP unix_timestamp_converterTime & DateConvert Unix timestamps in seconds or milliseconds to ISO 8601, UTC and local dates, or turn a date into a timestamp. Detects the unit automatically.
Input
Send these as a JSON object. Unknown fields are rejected.
- timestamp
- The timestamp, e.g. 1700000000. (string, required)
- unit
- auto, s or ms. (string, one of auto, s, ms, default "auto")
curl https://pithlab.com/api/v1/tools/unix-timestamp-converter \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"timestamp":"1700000000"}'Example response
{
"ok": true,
"result": {
"iso": "2023-11-14T22:13:20.000Z",
"utc": "Tue, 14 Nov 2023 22:13:20 GMT",
"seconds": 1700000000,
"milliseconds": 1700000000000,
"unit": "s",
"detected": true
}
}