What is a Unix timestamp?
A Unix timestamp, also called epoch time or POSIX time, is an integer counting the seconds elapsed since midnight UTC on January 1, 1970. It represents a single absolute moment independent of time zone, which makes it the default format for APIs, databases, log files, and inter-service communication. Humans cannot read it directly — 1700000000 means nothing at a glance — but every operating system and programming language can convert it to and from a calendar date.
Seconds vs milliseconds
Historical Unix timestamps are in seconds, a 10-digit number for any date in the current era. Modern JavaScript, Java, and many REST APIs use milliseconds (Date.now(), System.currentTimeMillis()) — a 13-digit number. A mismatch between the two is one of the most common bugs in backend code. This converter auto-detects based on digit count: numbers with 10 or fewer digits are treated as seconds, 13 digits as milliseconds.
The Year 2038 problem
A signed 32-bit integer can hold values up to 231-1 = 2,147,483,647, which represents 2038-01-19 03:14:07 UTC. Any system still using 32-bit time_t will overflow at that moment, wrapping into negative numbers and breaking. Most modern systems migrated to 64-bit time_t long ago, but legacy embedded firmware, old filesystems, and unpatched databases still pose a risk. It is the Unix analogue of Y2K — real, fixable, and mostly handled, but worth auditing.
