What Is Epoch Time?
Unix time (also called epoch time or POSIX time) counts the number of seconds that have passed since midnight UTC on January 1, 1970 - an arbitrary reference point chosen when Unix was first developed. Every subsequent instant in time is simply the number of seconds elapsed since that moment, with times before 1970 represented as negative numbers.
Because it's a single, timezone-independent number, epoch time is the de facto standard for storing timestamps in databases, log files, and APIs. Two systems in different timezones can agree on exactly when an event happened just by comparing the same number - no timezone conversion needed until you actually want to display it to a human.
Seconds vs Milliseconds
The original Unix timestamp is measured in whole seconds, but many modern languages and platforms - JavaScript included - use milliseconds instead for finer precision. A second-based timestamp for a date in 2026 is 10 digits long; the same instant in milliseconds is 13 digits, because it's simply the seconds value multiplied by 1,000.
| Unit | Typical Digit Count (current era) | Used By |
|---|---|---|
| Seconds | 10 digits | Unix time(), most database TIMESTAMP columns, PHP, Python time.time() |
| Milliseconds | 13 digits | JavaScript Date.now(), Java System.currentTimeMillis() |
This converter auto-detects which unit you've pasted by counting digits, so you don't have to remember which format a given API or log line uses before converting.
Timezones Explained
A raw Unix timestamp has no timezone of its own - it's simply a count of seconds from a fixed point. Timezone only enters the picture when you convert that number into a human-readable date, because "the same instant" is displayed as a different wall-clock time depending on where you are.
This is why this converter always shows both UTC and your detected local time side by side for every conversion - it removes the guesswork of "is this already my timezone, or do I need to adjust it?"
Common Pitfalls
- Mixing up seconds and milliseconds. Feeding a seconds-based timestamp into a millisecond-expecting function (or vice versa) produces a date wildly off - usually near 1970 or thousands of years in the future.
- Forgetting the timezone of a
datetime-localinput. Browser date/time pickers work in local time by default, so the same picked value converts to a different UTC timestamp depending on where the visitor is. - The Year 2038 problem. Systems that store seconds-based timestamps in a signed 32-bit integer will overflow on January 19, 2038. Most modern systems have already moved to 64-bit storage or milliseconds to avoid this.
- Assuming a timestamp is always positive. Dates before 1970 are represented as negative numbers, which some parsers or spreadsheet tools handle incorrectly.
Frequently Asked Questions
A plain number is trivial to sort, compare, and index without parsing a string or worrying about locale-specific date formats. Two systems can agree on exactly when something happened just by comparing the same integer, and storing it as a fixed-width number is also far more compact than a formatted date string - which is why timestamps dominate database schemas, API responses, and log formats.
January 1, 1970 has no special technical significance - it was simply a convenient, recent round date chosen by the early Unix developers in the early 1970s when they needed a fixed starting point to count seconds from. Any other reference date would have worked just as well; that one just happened to stick and became the de facto standard.
The HTML datetime-local input type has no timezone information built into its value by design - it represents a plain wall-clock date and time with no offset attached. That means a browser (and this tool) has no choice but to treat whatever you pick as your machine's current local time when converting it to a timestamp, so the exact same picked value produces a different underlying UTC instant depending on which timezone the visitor is in.
Millisecond values are about 1,000 times larger than the equivalent seconds value, so code that expects seconds but receives milliseconds computes a date roughly 1,000 times further from January 1, 1970 than intended - usually landing thousands of years in the future. The reverse mistake, seconds fed into millisecond-expecting code, does the opposite and collapses the date to somewhere just after 1970. Either way, a wildly wrong year is the first clue to check which unit is actually being used.
There's no universal standard - it comes down to which language or platform a system was originally built on. Systems that trace back to C's time() function, including Unix itself, PostgreSQL, PHP, and Python's time.time(), default to whole seconds, while JavaScript's Date.now() and many newer web APIs use milliseconds for finer precision. Always check a specific API's own documentation rather than assuming.
Systems that store seconds-based timestamps as a signed 32-bit integer will overflow on January 19, 2038 - the so-called Year 2038 problem. Modern systems that use 64-bit integers or milliseconds, like JavaScript's Date object, are unaffected for practical purposes.