Apple time

Cocoa / Mac Absolute Time

Convert Cocoa and Core Data timestamps — seconds since 2001.

Cocoa timestamp

Paste a Cocoa value, or pick a calendar date to convert the other way.

Cocoa timestamps, also called Mac Absolute Time, count seconds since January 1, 2001 UTC. Apple's frameworks use this reference throughout macOS and iOS, so the format appears in Core Data stores, property list files, Safari history, and countless application databases. Paste a Cocoa value here to see the date it represents, or pick a calendar date to convert the other way.

The conversion

Add 978,307,200 to a Cocoa timestamp to get Unix seconds, then format normally. Subtract the same constant to convert a Unix timestamp into Cocoa time. That constant is the number of seconds between 1970 and 2001, including the leap days in between.

Cocoa values are frequently fractional, because the underlying type is a floating-point number of seconds rather than an integer. A value with a long decimal tail is normal and carries sub-second precision. This converter accepts fractional input and preserves the resulting instant, though it displays the date to the second for readability.

Where you will find these values

Core Data uses Cocoa time for every date attribute, so any application built on that framework stores its dates this way in the underlying SQLite file. Property lists written by system services and applications use it for timestamps. Safari's history and download records use it. Notes, Messages metadata, calendar caches, and many third-party apps follow the same convention because they simply persist the framework's native date type.

When you open one of those databases with a generic SQLite browser, dates appear as numbers in the seven-hundred-million to eight-hundred-million range for recent years. That magnitude is the giveaway: it is far too small to be a Unix timestamp for a modern date, and far too large to be anything else plausible.

Frequently asked questions

What is a Cocoa timestamp?

A count of seconds since January 1, 2001 UTC, also called Mac Absolute Time. Apple's Foundation framework uses it as the native date representation, so Core Data stores, property lists, and Safari databases all record dates this way.

How do I convert it to a normal date?

Add 978,307,200 to get Unix seconds, then format as usual. That constant is the number of seconds between the 1970 and 2001 epochs. Subtracting it converts in the other direction.

Why is my value negative?

Because the date falls before 2001. Negative Cocoa timestamps are completely valid and represent earlier instants. Validation code that rejects negative timestamps will corrupt exactly those records during a migration.

Processing, please wait...