DevKitLab
Time
2026-09-14
•
4 min read

Understanding Unix Epoch Timestamps & Timezones

Demystifying 10-digit epoch seconds vs 13-digit milliseconds, ISO 8601 UTC strings, and leap seconds.

Unix timestamp (Epoch time) tracks absolute time as an integer representing elapsed seconds since **January 1, 1970 00:00:00 UTC**.

1. 10-Digit Seconds vs. 13-Digit Milliseconds - **Unix Seconds (10 digits):** Standard POSIX timestamp format used in Linux systems, Python `time.time()`, and databases like PostgreSQL. Example: `1700000000`. - **Unix Milliseconds (13 digits):** Precision format used by JavaScript `Date.now()`, Java `System.currentTimeMillis()`, and MongoDB ObjectId timestamps. Example: `1700000000000`.

2. ISO 8601 & UTC Standardization Storing raw Unix timestamps avoids timezone ambiguity in global applications. Convert to ISO 8601 (`YYYY-MM-DDTHH:mm:ss.sssZ`) at application boundaries for human readability.

Interactive Tools for This Guide

Frequently Asked Questions

What is the Year 2038 Problem (Y2K38)?

Legacy 32-bit signed integer systems will overflow on January 19, 2038 at 03:14:07 UTC. Modern 64-bit systems represent timestamps up to billions of years into the future.