Convert

Timestamp Conversion

0calls
Free

Timestamp or date string, which is more convenient? Don't worry, this endpoint gives you both formats easily!

Overview

This is a smart converter. Give it a Unix timestamp, it returns a human-readable datetime; give it a datetime string, it returns a Unix timestamp. It automatically recognizes your input format.

Usage Notes

This endpoint intelligently recognizes input formats:

  • Input timestamp: Supports 10-digit seconds (e.g., 1672531200) and 13-digit milliseconds (e.g., 1672531200000).
  • Input date string: For accuracy, use the standard YYYY-MM-DD HH:mm:ss format (e.g., 2023-01-01 08:00:00).
Tip

Regardless of input format, the response includes both standard date string and second-level Unix timestamp for your convenience.

Error Handling Guide

  • 400 Bad Request: If the time parameter is neither a valid timestamp nor a supported date format, you'll receive this error. Please check your input.

Query parameters

time
stringrequired

A smart time parameter accepting Unix timestamp (10 or 13 digits) or standard date string (e.g., '2023-10-27 10:30:00'). The system auto-recognizes and converts.

Response

200 / OK

Conversion successful! Response includes both standard date string and second-level Unix timestamp.

JSON

400 / Bad Request

Request failed. Check if the time parameter is a valid timestamp or supported date format (YYYY-MM-DD HH:mm:ss).

JSON