BasicApps Logo
Date Time Converter

Convert between different date and time formats

Mon, Jan 1, 2024 • 12:00:00 PM
Supports: Unix timestamps (seconds/milliseconds), ISO 8601, human-readable dates

January 1, 1970 isn't special — Bell Labs engineers just needed a round date and moved on

There's no astronomical significance, no historical event, nothing. When Unix engineers needed a fixed reference point for file system timestamps around 1971, they picked a recent round date. That's genuinely all there is to it. GPS time counts from January 6, 1980. TAI — International Atomic Time — counts from January 1, 1958. Unix timestamps count seconds elapsed since 00:00:00 UTC on January 1, 1970. The date only matters now because billions of systems decided to agree on it.

Timestamps worth knowing by heart
Seconds value Date & time (UTC) Why it matters
0 1970-01-01 00:00:00 The epoch — "zero time"
1 000 000 000 2001-09-09 01:46:40 One billion seconds; there were parties
1 234 567 890 2009-02-13 23:31:30 Sequential digits milestone
2 147 483 647 2038-01-19 03:14:07 32-bit signed int overflow — the Y2K38 problem
64-bit timestamps won't overflow until the year 292,277,026,596. That one's not your problem.

ISO 8601 and RFC 2822 are both "standard" date formats and they look nothing alike

ISO 8601 sorts fields largest-to-smallest: 2024-03-15T14:30:00Z. The trailing Z means UTC. An offset like +05:30 means India Standard Time. JavaScript's Date.parse() mostly accepts ISO 8601, but "mostly" is the operative word — trying to rely on it for arbitrary formats across browsers will eventually burn you. RFC 2822 is the email date format: Fri, 15 Mar 2024 14:30:00 +0000. You'll see it in email headers and RSS feeds. Parsing it with regex is a bad idea. The spec has enough edge cases that any regex you write will be wrong for at least one valid input.

Seconds vs. milliseconds: the bug that puts your dates in the year 50000

JavaScript's Date.now() returns milliseconds since epoch. Python's time.time() returns seconds. Most databases and Unix tools store seconds. Pass a millisecond timestamp to something expecting seconds and the resulting date is somewhere around the year 50000. The diagnosis is fast: a timestamp near 1 700 000 000 is seconds (late 2023). A timestamp near 1 700 000 000 000 is milliseconds. Ten digits is seconds, thirteen is milliseconds. That's the whole check.