By ToolzHive · Updated
Unix time counts seconds from 1970-01-01 00:00:00 UTC under the POSIX convention, which does not count leap seconds as extra elapsed seconds. It has no embedded local time zone.
Reference table
| Value or expression | Meaning | Use |
|---|---|---|
| 0 | 1970-01-01 00:00:00 UTC | Epoch |
| 1 | 1970-01-01 00:00:01 UTC | One second later |
| 86400 | 1970-01-02 00:00:00 UTC | One POSIX day later |
| 1704067200 | 2024-01-01 00:00:00 UTC | Seconds |
| 1704067200000 | Same instant | Milliseconds |
| Math.floor(Date.now()/1000) | Current whole Unix seconds | Milliseconds to seconds |
| new Date(seconds*1000) | JavaScript Date input | Seconds to milliseconds |
Copyable example
new Date(1704067200 * 1000).toISOString();
// 2024-01-01T00:00:00.000Z Check the unit
Many present-day timestamps have 10 digits in seconds and 13 in milliseconds, but digit count is only a clue. Read the API contract.
Calendar dates
A local calendar day can differ from 24 hours at a daylight-saving transition. Use calendar-aware logic for appointments.
Try the related tools
- Date Calculator (Add & Subtract) — Add or subtract days, weeks, months and years from a date, with an optional business-days mode.
- Unix Timestamp Converter — Convert Unix timestamps to human dates and back.