How to Convert Epoch Time to a Date, Explained in Plain English

An epoch timestamp is a count of seconds since 1 January 1970, 00:00:00 UTC. That moment is called the Unix epoch. Computers love timestamps because they are single numbers that sort and compare easily. Humans hate them because 1700000000 means nothing at a glance. Here is how to read one.

What the number means

A Unix timestamp counts seconds, not days or years. 0 means exactly the epoch moment. 86,400 means one day later, because a day has 86,400 seconds. 1,000,000,000 means 9 September 2001. Negative timestamps mean dates before 1970. The count ignores leap seconds, so it is a clean, steady clock rather than an astronomical one.

The most common trap is milliseconds. Many systems, especially JavaScript and some APIs, give timestamps in milliseconds, which are 1,000 times larger. If your timestamp has 13 digits, it is almost certainly milliseconds: divide by 1,000 first. A 10-digit timestamp is seconds.

Converting by hand

Divide the timestamp by 86,400 to get days since the epoch, and keep the remainder. The remainder divided by 3,600 gives hours, then minutes, then seconds. Example: 1,700,000,000 seconds / 86,400 = 19,675 days with a remainder of 80,000 seconds. That remainder is 22 hours (79,200 seconds) plus 800 seconds, which is 13 minutes and 20 seconds. So the time part is 22:13:20 UTC.

Converting 19,675 days into a calendar date by hand is tedious, which is why the practical method is to anchor on a known date. Count whole years from 1970, subtracting 365 or 366 for leap years as you go, until the remainder is under a year, then count months. For 1,700,000,000 the answer is 14 November 2023, 22:13:20 UTC. The hand method teaches the structure; a converter does the calendar grind.

Timezones and traps

Unix timestamps are always in UTC. The same timestamp shows as different local times around the world: 22:13:20 UTC is 23:13:20 in Paris in winter and 17:13:20 in New York. If a converted date looks a few hours off, suspect a timezone, not a broken timestamp.

Other traps: timestamps stored as text that a spreadsheet mangles, 32-bit systems that overflow in 2038, and APIs that silently switch between seconds and milliseconds. When a date comes out as the year 52,000 or 1970, check the unit first.

Quick reference

0 = 1 January 1970, 00:00:00 UTC. 1,000,000,000 = 9 September 2001. 1,700,000,000 = 14 November 2023, 22:13:20 UTC. 2,000,000,000 will be 18 May 2033. If you only need a rough sense, remember that timestamps near 1.7 billion are late 2023, and each additional 31,536,000 seconds is roughly one more year.

Converting the other way: date to timestamp

To turn a date into a timestamp, count days from 1 January 1970 to your date, multiply by 86,400, then add the seconds within the day. Example: 1 January 2024. From 1970 to 2024 is 54 years, including 13 leap days (1972 through 2020), so 54 x 365 + 13 = 19,723 days. Times 86,400 gives 1,704,067,200, the timestamp for midnight UTC on 1 January 2024.

For dates with a time of day, add hours x 3,600, minutes x 60, and seconds. And remember the result is UTC: a local midnight in another timezone is a different timestamp. Convert local time to UTC first, or the timestamp will be off by your timezone offset.

Try it faster with the tool

You can follow every step above by hand, but the free Online Epoch Time to Date Converter does the arithmetic for you. Enter your numbers and it gives the answer right away, so you can check your hand calculation or skip straight to the result.

Quick tips

  • Unix time counts seconds since 1 January 1970 UTC.
  • 13 digits means milliseconds: divide by 1,000 first.
  • Timestamps are UTC; local time depends on your timezone.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top