Apple Epoch Time Converter: How to Decode Dates
- Unix timestamp
- 1700000000 seconds
- You entered
An Apple epoch time converter is a tool that translates Unix epoch time (seconds since January 1, 1970) into a human-readable date and time, and often the reverse. You enter a Unix timestamp (like 1700000000) and get the corresponding calendar date and time in your local timezone, or you enter a date and get the timestamp. This page explains how the conversion works, why Apple devices use it, and how to perform the conversion yourself.
Formula
The conversion from Unix timestamp to a date uses the formula:
Date (in Excel serial number) = (timestamp / 86400) + 25567
Where:
- timestamp = the Unix epoch time in seconds (integer)
- 86400 = the number of seconds in one day (60 × 60 × 24)
- 25567 = the number of days from January 1, 1900 (Excel’s epoch) to January 1, 1970 (Unix epoch)
The resulting number is an Excel serial date, which can be formatted as a date in spreadsheet software. For example, 25569 is January 1, 1970, because Excel counts from January 1, 1900 as day 1.
Worked Example
Using the default timestamp of 1,700,000,000 seconds:
- Divide by 86400: 1,700,000,000 / 86400 = 19675.9259 days
- Add 25567: 19675.9259 + 25567 = 45242.9259
- Excel serial date 45242.9259 corresponds to November 14, 2023 at approximately 22:13 UTC.
So 1,700,000,000 epoch seconds equals November 14, 2023, 22:13:20 UTC (the exact time depends on fractional seconds).
What Is Epoch Time and Why Apple Uses It
Unix epoch time, also called POSIX time or Unix timestamp, is a system for tracking time as the number of seconds that have elapsed since the Unix epoch: January 1, 1970, at 00:00:00 UTC (not counting leap seconds). Apple’s operating systems—iOS, macOS, watchOS, tvOS—are built on a Unix-like foundation (Darwin, derived from BSD), so they internally store dates and times as epoch seconds. This makes time arithmetic simple (e.g., adding 60 seconds to a timestamp) and avoids timezone ambiguities, since the timestamp is always UTC.
When you see a timestamp in a log file, a database, or a file’s metadata, it is likely stored as epoch seconds. Apple’s APIs (like Date in Swift) use a time interval since a reference date (which is January 1, 2001, not 1970), but for interoperability with Unix tools, many systems still use the 1970 epoch.
How to Convert Epoch Time Manually
If you need to convert without a calculator, you can do it by hand:
- Divide the timestamp by 86,400 to get the number of days since the epoch.
- Take the remainder (the fractional part) and multiply by 86,400 to get the seconds since midnight UTC.
- Convert the days to a date by counting forward from January 1, 1970. (This is tedious, but you can use a known reference like 2000-01-01 = 946684800 seconds.)
For example, timestamp 946684800 is exactly 2000-01-01 00:00:00 UTC. So any timestamp can be compared to that reference.
Using Apple’s Built-in Tools
You don’t always need a separate converter. Apple provides built-in ways to see epoch time:
- Terminal (macOS): Type
date +%sto get the current epoch time. To convert a timestamp to a date, usedate -r 1700000000(on macOS, the-rflag is used; on Linux it’s-d @1700000000). - Shortcuts app (iOS/macOS): You can create a shortcut that uses the “Format Date� action to convert a timestamp, but it requires a bit of setup.
- Numbers (spreadsheet): As shown in the formula, you can enter the timestamp in a cell and use the formula to get a date.
Common Pitfalls and Misconceptions
One common mistake is confusing the Unix epoch (1970) with Apple’s Cocoa epoch (2001). Apple’s NSDate uses a reference date of January 1, 2001, so if you see a timestamp like 1234567890, it might be either epoch. Always check which system you’re dealing with.
Another pitfall is timezone: a timestamp is always UTC, but when you display it, you must convert to local time. If you don’t, you’ll be off by hours. Also, leap seconds are ignored in Unix time; the system simply doesn’t account for them, which is fine for most applications.
Finally, be careful with the year 2038 problem: on 32-bit systems, timestamps overflow in January 2038. Apple devices have been 64-bit for years, so this is not an issue for current hardware, but older software might still have the bug.
Alternatives to an Apple-Specific Converter
You don’t need a converter designed specifically for Apple. Any Unix epoch converter works, because the epoch is the same across all Unix-like systems. However, some converters offer features like:
- Automatic detection of milliseconds vs. seconds (e.g., 13-digit timestamps are milliseconds).
- Display in multiple timezones.
- Conversion in both directions (timestamp to date and date to timestamp).
If you work in a spreadsheet, you can use the formula above. If you work in code, most programming languages have built-in functions: in Python, datetime.fromtimestamp(); in JavaScript, new Date(timestamp * 1000).
Frequently Asked Questions
What is the difference between Unix epoch and Apple’s Cocoa epoch?
Unix epoch is January 1, 1970. Apple’s Cocoa epoch (used in NSDate) is January 1, 2001. The difference is 978307200 seconds. If you have a timestamp from an Apple API and you treat it as Unix time, you’ll be off by about 31 years.
How do I convert a timestamp in Excel on a Mac?
Enter the timestamp in a cell, then in another cell use the formula =(A1/86400)+25569 and format the cell as a date. Note that the base date for Excel on Mac is the same as on Windows (January 1, 1900), but there is a known bug: Excel thinks 1900 was a leap year, so you may need to adjust by one day for dates before March 1, 1900. For modern dates, the formula works.
Why do some timestamps have 13 digits?
Those are in milliseconds, not seconds. For example, 1700000000000 is 1,700,000,000,000 milliseconds, which is the same as 1,700,000,000 seconds. To convert, divide by 1000 first.
Is the epoch time always the same on all Apple devices?
Yes, the Unix epoch is a standard. All Apple devices use the same epoch, and they all calculate the current time the same way. The only difference is the timezone when displaying it, but the underlying number is identical.
Can I use the Shortcuts app to convert epoch time?
Yes. You can create a shortcut that takes a number, divides by 1000 if needed, and then uses the “Format Date� action with a custom format. It’s a bit involved, but possible. A simpler approach is to use a dedicated converter or Terminal.
What is the year 2038 problem?
On 32-bit systems, the maximum value of a signed integer is 2,147,483,647, which corresponds to January 19, 2038. After that, the timestamp overflows and becomes negative. Apple devices have used 64-bit processors since the iPhone 5s and Macs since 2006, so they are not affected, but old software might be.
Related
Formula used
in t | Unix timestamp | seconds | 1700000000 | 0 out dt | Date and time (UTC) | - | t / 86400 + 25567 | 5
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.