Epoch Time to Time Conversion Explained
- ISO 8601 (UTC)
- Result
- Epoch seconds
- 1700000000 s
- You entered
Epoch time to time conversion turns a large integer—seconds (or milliseconds) since January 1, 1970, 00:00:00 UTC—into a human-readable date and time, or the reverse. You enter an epoch number and get the corresponding UTC and local calendar date, or you enter a date and get the epoch value. This converter handles both directions and shows the result in seconds, milliseconds, and ISO 8601 format.
Formula
The core formula for converting epoch seconds to a date is:
Date = EpochSeconds / 86400 + 25567
- EpochSeconds – the number of seconds elapsed since 1970-01-01 00:00:00 UTC (the Unix epoch).
- 86400 – the number of seconds in one day (60 × 60 × 24).
- 25567 – the serial number of 1970-01-01 in the 1900 date system (used by many spreadsheet programs).
For milliseconds, divide by 1000 first. For a date to epoch, reverse it: EpochSeconds = (DateSerial – 25567) × 86400.
Worked Example
Using the default value of 1,700,000,000 epoch seconds:
- Divide by 86400: 1,700,000,000 ÷ 86400 = 19675.9259… days.
- Add 25567: 19675.9259 + 25567 = 45242.9259 (Excel serial date).
- Convert the fractional day to time: 0.9259 × 24 = 22.22 hours, which is 22:13:20.
- The result: 2023-11-14 22:13:20 UTC.
This matches the calculator’s output for the default input.
What Is Epoch Time?
Epoch time (also called Unix time, POSIX time, or Unix timestamp) is a system for tracking time as a running total of seconds. The count starts at the “epoch�—January 1, 1970, 00:00:00 UTC. This moment was chosen by early Unix developers because it was a clean, round number and simplified date calculations. Today, almost all computer systems, from Linux servers to JavaScript in browsers, use epoch time internally.
One key detail: epoch time is not affected by time zones. It represents an absolute instant. When you convert it, you choose a time zone to display it in—UTC or your local zone. The underlying number never changes.
How to Read the Result
When you convert an epoch number, you’ll get two main outputs:
- UTC date/time – the date and time at Greenwich, England, without any daylight saving adjustment. This is the “true� time the epoch represents.
- Local date/time – the same instant expressed in your current time zone. For example, if you are in New York (UTC-5 in winter), 1,700,000,000 seconds is 2023-11-14 17:13:20 EST.
If you see a date like “45242.93� in a spreadsheet, that’s an Excel serial date—the number of days since 1900-01-01. The formula above converts between the two systems.
Common Mistakes and Pitfalls
People frequently trip over these issues:
- Seconds vs. milliseconds – Many APIs (especially JavaScript’s
Date.now()) return milliseconds. A value like 1700000000000 is 1.7 trillion milliseconds, which is about 2023, not 1970. Always check the magnitude. - Time zone confusion – Epoch time is UTC. If you subtract your local offset before converting, you’ll get a wrong date. Always convert to UTC first, then adjust for display.
- Leap seconds – Officially, a day can have 86401 seconds. Most systems ignore leap seconds, so epoch time is not exactly the number of SI seconds since 1970, but the difference is tiny and rarely matters.
- Negative values – Dates before 1970 are negative numbers. For example, 1969-12-31 23:59:59 UTC is -1. The calculator accepts negatives.
When to Use This Conversion
You’ll need epoch-to-time conversion in many practical situations:
- Reading logs from servers that record timestamps as Unix time.
- Debugging API responses that return
created_atas an integer. - Working with databases like PostgreSQL (which can store epoch values) or spreadsheets that import data from web sources.
- Setting expiration times in cookies or tokens—many systems use epoch seconds for “expires� fields.
For example, if a JSON response shows "last_login": 1710000000, you can convert that to see the actual login date. Without conversion, you’re just looking at a meaningless number.
Alternative Methods
Besides this calculator, you can convert epoch time using:
- Command line – On Linux/macOS,
date -d @1700000000prints the UTC date. On Windows PowerShell,[DateTimeOffset]::FromUnixTimeSeconds(1700000000). - Spreadsheet formulas – In Excel or Google Sheets,
=A1/86400+DATE(1970,1,1)converts seconds, and=(A1-DATE(1970,1,1))*86400converts a date to seconds. - Programming languages – Python’s
datetime.fromtimestamp(), JavaScript’snew Date(seconds*1000), or PHP’sdate()function.
These are handy when you’re already in a terminal or code editor, but a web calculator is faster for one-off checks.
Frequently Asked Questions
What is the difference between epoch time and Unix time?
They are essentially the same. “Unix time� is the official name, “epoch time� refers to the same concept. The epoch is the starting point (1970-01-01), and the time is the count of seconds from that point. Some people say “epoch timestamp� to mean the number.
Why is 1970 the starting point?
Unix was developed in the late 1960s and early 1970s. The developers needed a simple, fixed reference date. They chose January 1, 1970, because it was a convenient round number and easy to compute with. It also avoided issues with earlier date systems that used different starting years.
How do I convert a date to epoch time?
Use this calculator in reverse: enter the date and time (in UTC or local) and it will output the epoch seconds. Alternatively, in a spreadsheet, use =(A1-DATE(1970,1,1))*86400 where A1 is the date cell. Remember that the result will be in seconds; multiply by 1000 for milliseconds.
What happens after 2038?
On January 19, 2038, 32-bit signed integers that store epoch seconds will overflow because the maximum value is 2,147,483,647. This is known as the “Year 2038 problem.� Most modern systems use 64-bit integers, which can represent dates billions of years into the future, so they are safe. Legacy 32-bit systems will need updates before then.
Does epoch time account for daylight saving time?
No. Epoch time is always UTC, which has no daylight saving. When you convert to a local time zone, the conversion applies the DST rules for that zone. So the same epoch number can correspond to different local times depending on the season, but the epoch itself never changes.
Related
Formula used
in t | Epoch seconds | s | 1700000000 | 0 out dt | UTC date/time | - | t / 86400 + 25567 | 6 out iso | ISO 8601 (UTC) | - | (t - 0) / 86400 + 25567 | 6
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.