100% Client-Side Computation • Zero Server Logs • Instant Execution
Curious TechieDev Toolbox
← All Guides/Time & Epoch•8 min read

What is Unix Time (Epoch)?

Why computers count seconds from Jan 1, 1970, 32-bit vs 64-bit timestamps, leap seconds, and the Year 2038 problem.

ⓘKey Takeaways
  • Unix time represents elapsed seconds since 00:00:00 UTC on January 1, 1970 (the Unix Epoch).
  • It provides an unambiguous, timezone-agnostic integer ideal for database storage and server synchronization.
  • The Year 2038 Problem (Y2038) causes 32-bit signed integers to overflow on Jan 19, 2038; modern systems mitigate this with 64-bit timestamps.
  • Unix time ignores leap seconds, stepping timestamps backward during official IERS leap insertions.

Computers require an unambiguous, monotonically increasing numeric format to order chronological events across servers distributed across the globe. That foundational standard is Unix Epoch Time.

1. What is the Unix Epoch?

The Unix epoch is defined as 00:00:00 Coordinated Universal Time (UTC) on Thursday, 1 January 1970. Every second that elapses increments this integer counter by 1.

2. Seconds (10-digit) vs Milliseconds (13-digit)

Operating system kernels (Linux, POSIX) measure time in seconds (e.g. 1787610000). High-level application runtimes like JavaScript and Java measure in milliseconds (e.g. 1787610000000). Multiplying or dividing by 1,000 bridges the two representations.

3. Timezones & ISO 8601 Strings

An epoch timestamp has zero timezone bias — it represents an absolute point in the universe. Local timezone formatting (e.g. EST, GMT+5:30) is applied only at presentation time using ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ).

4. The Year 2038 (Y2038) Bug Explained

Systems that store Unix timestamps in 32-bit signed integers will overflow on 03:14:07 UTC on 19 January 2038, wrapping around to negative numbers (1901). Modern 64-bit architectures eliminate this issue, extending safe timestamp capacity for 292 billion years.