API response timestamp
A REST API returns an event time as Unix seconds.
- Timestamp: 1704067200
- Timezone: UTC
UTC time: 2024-01-01T00:00:00.000Z
Use UTC for logs and API comparisons so local timezone settings do not hide ordering problems.
Unix timestamp and date time conversion, supports multiple timezones
Second-level timestamp (10 digits)
Enter timestamp or date time to start conversion
Unix timestamp is the total seconds from January 1, 1970 00:00:00 UTC to the specified time. It is a standard way to represent time, widely used in computer systems and programming.
Common timestamps include second-level (10 digits), millisecond-level (13 digits), and microsecond-level (16 digits). This tool uses second-level timestamps, which is the most commonly used format.
Timestamps are timezone-agnostic and always based on UTC. When converting to local time, timezone offset needs to be considered. Different regions may have different daylight saving time rules.
Timestamps are commonly used in database storage, logging, API communication, cache expiration, and other scenarios. They facilitate time calculations, comparisons, and storage, serving as a universal standard for time processing.
Unix timestamp = floor(milliseconds since 1970-01-01T00:00:00Z / 1000)
Date object milliseconds = Unix timestamp * 1000
UTC date/time = format Date object in UTC
Local date/time = format Date object in selected timezoneA REST API returns an event time as Unix seconds.
UTC time: 2024-01-01T00:00:00.000Z
Use UTC for logs and API comparisons so local timezone settings do not hide ordering problems.
A browser event stores Date.now() output.
Unix timestamp: 1704067200
A 13-digit value is usually milliseconds; a 10-digit value is usually seconds.
A database stores UTC while the product UI displays local time.
Same instant, different displayed clock time
Store instants in UTC and apply timezone formatting only at the display layer.