Real Epoch Converter logo realepochconverter
cocoa / core data converter

Cocoa Core Data Timestamp Converter. Seconds Since 2001

Apple's Foundation framework counts time in seconds since 2001-01-01 00:00:00 UTC, the Cocoa epoch. Any NSDate you export, and any Core Data store you inspect, is full of these values.

converter

Cocoa Core Data time → dates.

Core Data's Date stores seconds since 2001 (an epoch that shows up in iCloud records, SQLite stores, and synced plists.

The 2001 epoch, and why it exists

NeXTSTEP's engineers picked 2001 as the reference date for the NSDate type. A round "start of the millennium" that kept epoch values small and readable in the platform's early years. Today a Core Data Date attribute is stored as seconds since that instant, so 807753600 is 2026, not 1995. Converting is simple: Unix time = cocoa seconds + 978,307,200 (the 1970→2001 gap).

Where you meet Cocoa time

  • Core Data SQLite stores, the Z… date columns hold Cocoa seconds; a value like 8.069724e8 is a float in the raw DB.
  • iCloud and CloudKit records. Exported NSDate values and sync payloads use the same epoch.
  • Plist exports, macOS tools that dump .plist files often show these seconds before any app-layer formatting.
  • Swift code. Date().timeIntervalSince1970 returns Unix seconds, but timeIntervalSinceReferenceDate returns Cocoa seconds; mixing them is a classic off-by-31-years bug.

Worked examples

  • 807753600 → Aug 7, 2026 00:00:00 UTC. Check: 807,753,600 + 978,307,200 = 1,786,060,800 seconds = Aug 7, 2026 00:00:00 UTC. (Watch out: 806972400 is a value often quoted for this example, but it decodes to Jul 28, 2026 23:00 UTC, and read as plain Unix time it is Aug 7, 1995 — mixing the two clocks is exactly the classic Cocoa bug.)
  • 0 → Jan 1, 2001 00:00:00 UTC, the epoch itself.
  • 807753600.5 → Aug 7, 2026 00:00:00.5 UTC. The tool accepts fractional seconds, exactly as Core Data stores them — but note display precision is whole seconds, so the half second is preserved in the Unix-seconds row, not the clock digits.

In your own code

  • Swift: Date(timeIntervalSinceReferenceDate: cocoaSeconds) to decode; date.timeIntervalSinceReferenceDate to encode.
  • Python: datetime.fromtimestamp(cocoa + 978307200, tz=timezone.utc).
  • SQL: datetime(cocoa + 978307200, 'unixepoch') in SQLite.

Gotchas

  • Reference vs Unix, never feed Cocoa seconds into a Unix formatter; the ~31-year offset puts every date in the wrong decade.
  • Fractions. Core Data stores sub-second precision as a decimal part. The converter accepts and returns fractional seconds.
  • Negative values, anything before 2001 is a negative number. The converter handles them, back to the earliest representable dates.

Related tools

The resulting Unix seconds plug straight into the timestamp-to-date converter. For Apple adjacent formats, the Mac HFS+ converter handles the 1904 epoch used by classic Mac filesystems.

First published · Last reviewed · Maintained and developed by the Real Epoch Converter team · [email protected] · Contact · Methodology

More timestamp tools

Need the plain Unix timestamp instead of this format? The epoch time converter on the home page converts dates to Unix timestamps and back — seconds, milliseconds, or microseconds — with batch conversion, and the Unix timestamp to date converter handles one value at a time.

Prefer reading? The guides explain Unix time, timestamp formats, and common bugs in depth, and the methodology page documents exactly how this site handles negative timestamps, fractional seconds, leap seconds, and daylight-saving transitions.

Copied