Mac HFS+ Timestamp Converter - HFS Plus Seconds Since 1904

Convert a Mac timestamp, HFS Plus timestamp, HFS+ timestamp, or Mac OS Extended timestamp to a readable date. HFS+ values are whole seconds since January 1, 1904 GMT/UTC, and every conversion runs locally in your browser.

HFS+ Timestamp to Date

Current Mac HFS+ timestamp
...
Live seconds since 1904-01-01T00:00:00Z.
Paste a decimal integer, 0x hex value, compact hex, or spaced hex bytes.
Auto-detect keeps decimal values decimal and treats spaced byte strings as big-endian.

Date to HFS+ Timestamp

Interpreted in your current local time zone.
ISO-8601 offsets are respected.

Display Settings

Results always include UTC; this controls the extra local view.

Unix <-> HFS+ offset: 2,082,844,800 seconds.

Advertisement

Batch Decode HFS+ Values

About HFS+ Time

HFS+, also known as HFS Plus or Mac OS Extended, stores file-system timestamps as whole seconds since 1904-01-01T00:00:00Z. Compared with Unix time, the exact epoch gap is 2,082,844,800 seconds.

  • HFS+ to Unix seconds: unix = hfs - 2,082,844,800
  • Unix seconds to HFS+: hfs = unix + 2,082,844,800
  • Endianness: HFS Plus on-disk structures are big-endian; little-endian previews help when raw bytes were copied in reverse order.
  • Range: an unsigned 32-bit HFS+ timestamp spans 1904-01-01T00:00:00Z through 2040-02-06T06:28:15Z. The often-cited 2106 date is Unix unsigned 32-bit overflow, not HFS+ unsigned 32-bit overflow.

HFS+ Time Code Examples

Compact examples for converting between HFS+ seconds since 1904-01-01 UTC and human time. Example input 2082844800 decodes to 1970-01-01T00:00:00Z.

const HFS_OFFSET = 2082844800n;
function hfsToDate(hfs) {
  return new Date(Number((BigInt(hfs) - HFS_OFFSET) * 1000n));
}
function dateToHfs(date) {
  return BigInt(Math.floor(date.getTime() / 1000)) + HFS_OFFSET;
}
console.log(hfsToDate(2082844800n).toISOString()); // 1970-01-01T00:00:00.000Z

Known HFS+ Timestamp Values

Value Meaning UTC date
0Start of the HFS+ epoch1904-01-01T00:00:00Z
2082844800Unix epoch offset in decimal1970-01-01T00:00:00Z
0x7C25B080Unix epoch offset in hexadecimal1970-01-01T00:00:00Z
4294967295Maximum unsigned 32-bit HFS+ timestamp2040-02-06T06:28:15Z
4294967296Next second wraps to 0 in unsigned 32-bit fields1904-01-01T00:00:00Z after wrap

HFS+ Timestamp FAQ

What is a Mac HFS+ timestamp?

A Mac HFS+ timestamp, also called an HFS Plus timestamp or Mac OS Extended timestamp, counts whole seconds since January 1, 1904 at 00:00:00 GMT/UTC.

Is Mac timestamp the same as Cocoa/Core Data time?

No. HFS+ time starts at 1904-01-01 UTC. Cocoa and Core Data absolute time start at 2001-01-01 UTC, so the numeric values are different even when they describe the same instant.

Does HFS+ use UTC or local time?

HFS Plus timestamps are defined as seconds from the 1904 epoch in GMT/UTC. This tool decodes to UTC first and then shows the selected local time zone for convenience.

Why does HFS+ start in 1904?

The classic Mac epoch starts at 1904-01-01, which begins a leap-year cycle and avoids the special 1900 leap-year rule that complicates calendar arithmetic.

What happens in 2040?

An unsigned 32-bit HFS+ field reaches 4294967295 at 2040-02-06T06:28:15Z. If a field is limited to 32 bits, the next second wraps to 0, which represents 1904-01-01T00:00:00Z.

How do I convert HFS+ to Unix time?

Subtract 2,082,844,800 from the HFS+ timestamp. Add the same offset to convert Unix seconds back to HFS+ seconds.

Is HFS+ big-endian?

Yes. HFS Plus volume structures are big-endian on disk. If you have copied four raw bytes from a little-endian view, use the little-endian input mode or compare the swapped-byte preview.

Which file metadata fields use HFS+ timestamps?

HFS Plus catalog records use timestamp fields for metadata such as creation time, content modification time, attribute modification time, access time, and backup time.

References and Accuracy Notes

Explore more tools