What is a Unix timestamp?
A Unix timestamp represents an instant as elapsed seconds from 1970-01-01 00:00:00 UTC, ignoring leap seconds in the conventional model. It is compact, sortable, and widely used in operating systems, databases, logs, APIs, and token claims.
The number is not a formatted calendar date. Software converts it into a date and applies a display time zone when presenting it to a person.
Seconds versus milliseconds
Unix seconds
1788134400JavaScript milliseconds
1788134400000The millisecond form is exactly 1,000 times the second form for the same instant. A value interpreted with the wrong unit can produce a date near 1970 or far outside an application's expected range.
UTC, local time, and time zones
A timestamp identifies one instant globally. Formatting that instant in UTC, Asia/Shanghai, America/New_York, or another zone can produce different calendar dates and clock times.
Daylight-saving rules affect local display and scheduled wall-clock behavior, but they do not change the underlying instant represented by the timestamp.
Negative timestamps
Negative values count backward from the epoch. For example, -1 represents one second before 1970-01-01 00:00:00 UTC. Language, database, and platform date ranges vary, so historical values should be tested in the target environment.
Unix timestamps in JavaScript
const seconds = 1788134400;
const date = new Date(seconds * 1000);
console.log(date.toISOString());
const milliseconds = Date.now();
const unixSeconds = Math.floor(milliseconds / 1000);Use the Unix Timestamp Converter to compare seconds, milliseconds, UTC, and your browser's local representation.
Unix timestamps in JWTs and schedules
JWT NumericDate claims use Unix seconds; see How to Decode a JWT before interpreting exp, iat, or nbf.
A cron expression is different: it describes recurring calendar fields rather than one absolute instant. Read the Cron Expression Guide for scheduling syntax and time-zone considerations.