What is a Unix timestamp?
A Unix timestamp counts the seconds elapsed since 00:00:00 UTC on 1 January 1970 (the "epoch"), ignoring leap seconds. Because it's a single number in UTC, it's the most common way APIs and databases store moments in time. JavaScript's Date.now() and many JSON APIs use milliseconds instead of seconds.
Seconds or milliseconds?
Current timestamps have 10 digits in seconds (e.g., 1767225600) and 13 digits in milliseconds. Auto-detect treats values above 100 billion as milliseconds.
Snippets
// JavaScript Math.floor(Date.now() / 1000) new Date(1767225600 * 1000).toISOString() # Python import time, datetime int(time.time()) datetime.datetime.fromtimestamp(1767225600, datetime.timezone.utc) -- PostgreSQL SELECT extract(epoch FROM now()); SELECT to_timestamp(1767225600);
The year 2038 problem
Systems that store timestamps as signed 32-bit integers overflow at 03:14:07 UTC on 19 January 2038. Use 64-bit integers or native timestamp types for anything long-lived.