Timestamp Formats Comparison
Current Timestamp in All Formats
The current moment represented in each timestamp format (updates in real-time):
Unix/POSIX
Unix Milliseconds
Windows FILETIME
Mac HFS+
NTP Timestamp
GPS Time
Excel Serial Date
Apple Cocoa/iOS
Timestamp Formats Comparison Table
This comprehensive comparison shows the key differences between timestamp systems used by different operating systems, applications, and protocols.
| Format | Epoch (Start Date) | Unit | Bits | Used By |
|---|---|---|---|---|
| Unix/POSIX | January 1, 1970, 00:00:00 UTC | Seconds | 32/64 | Linux, macOS, most programming languages |
| Unix Milliseconds | January 1, 1970, 00:00:00 UTC | Milliseconds | 64 | JavaScript, Java, modern APIs |
| Windows FILETIME | January 1, 1601, 00:00:00 UTC | 100-nanosecond intervals | 64 | Windows NTFS, Active Directory |
| Mac HFS+ | January 1, 1904, 00:00:00 Local | Seconds | 32 | macOS HFS+ (legacy) |
| NTP Timestamp | January 1, 1900, 00:00:00 UTC | Seconds (32.32 fixed-point) | 64 | Network Time Protocol |
| GPS Time | January 6, 1980, 00:00:00 UTC | Weeks + Seconds | 10 + 32 | GPS satellites and receivers |
| Excel Serial Date | December 30, 1899 (or Jan 1, 1904 Mac) | Days (fractional for time) | Double precision float | Microsoft Excel, LibreOffice Calc |
| Apple Cocoa/iOS | January 1, 2001, 00:00:00 UTC | Seconds (double) | 64 | macOS, iOS, Swift, Objective-C |
Convert Between Formats
Enter a timestamp in any format to convert it to all other formats.
Understanding Each Format
Unix/POSIX Timestamp
The most widely used timestamp format. Counts seconds since January 1, 1970, 00:00:00 UTC. Used by virtually all Unix-based systems and most programming languages. The 32-bit version will overflow in 2038 (Y2K38 problem).
Windows FILETIME
Microsoft's timestamp format, counting 100-nanosecond intervals since January 1, 1601. This date was chosen because it's the start of a 400-year cycle in the Gregorian calendar. Always 64-bit, so no overflow concerns.
Mac HFS+
Apple's older filesystem timestamp, counting seconds since January 1, 1904 in local time (not UTC!). The 32-bit version will overflow on February 6, 2040. Modern APFS uses different timestamps.
NTP Timestamp
Used by the Network Time Protocol, starting from January 1, 1900. Uses a 32.32 fixed-point format with the integer part for seconds and the fractional part for sub-second precision. Era 0 overflows in 2036.
GPS Time
GPS satellites use weeks and seconds since January 6, 1980. Originally 10 bits for weeks (max 1024 weeks ≈ 19.7 years), causing "week rollover" issues. Modern receivers handle multiple rollovers.
Excel Serial Date
Microsoft Excel uses a serial date number where the integer part represents days since December 30, 1899 and the decimal part represents the time of day. Note: Excel incorrectly treats 1900 as a leap year for Lotus 1-2-3 compatibility.
Apple Cocoa/iOS
Modern Apple platforms (Swift, Objective-C) use seconds since January 1, 2001, 00:00:00 UTC. This is Apple's "Core Foundation Absolute Time" reference date. Stored as a double-precision float.
Conversion Formulas
Here are the mathematical formulas to convert between Unix time and other formats:
// Unix to Windows FILETIME
windows = (unix + 11644473600) × 10000000
// Unix to Mac HFS+
hfs = unix + 2082844800
// Unix to NTP
ntp = unix + 2208988800
// Unix to GPS (seconds)
gps = unix - 315964800
// Unix to Excel
excel = (unix / 86400) + 25569
// Unix to Cocoa
cocoa = unix - 978307200
// Reverse: Windows FILETIME to Unix
unix = (windows / 10000000) - 11644473600