1. Home
  2. Developer tools
  3. Cocoa / Core Data Timestamp Converter

Cocoa / Core Data Timestamp Converter

Read dates in SQLite databases from iOS and macOS apps, forensic exports and plist files, where time starts in 2001 instead of 1970.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Cocoa / Core Data Timestamp Converter

  1. Paste the number and choose seconds or nanoseconds.
  2. Read the UTC and local date and the Unix time.
  3. Convert a date back, or copy the SQL expression.

Features

  • Seconds with fractions, or nanoseconds (Messages, Photos)
  • Automatic nanosecond detection for very large values
  • Warning when the value looks like Unix time instead
  • SQLite datetime() expression for Core Data columns
  • Date back to Apple seconds and nanoseconds

Supported formats

Input

  • Typed or pasted text

You get

  • Copied text

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Cocoa / Core Data Timestamp Converter is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Nanosecond values beyond JavaScript’s safe integer range lose sub-microsecond precision.

Guide

Reading Apple timestamps that start in 2001

Most systems count time from 1 January 1970, but Apple’s frameworks use a different starting point: 1 January 2001. Timestamps from iOS and macOS databases, plist files and app exports therefore look like Unix times but convert to dates 31 years too early. This converter reads Apple timestamps in seconds or nanoseconds and converts dates back.

Apple’s reference date

Foundation’s NSDate, Swift’s Date and Core Data store time as seconds since the reference date, 1 January 2001 at 00:00:00 UTC; Apple calls this “absolute time”. The gap to the Unix epoch is exactly 978,307,200 seconds, the length of the 31 years from 1970 to 2001 including eight leap days. Adding that number to an Apple timestamp gives Unix time, which is how every conversion here works.

Seconds and nanoseconds

Core Data and most plist dates use seconds, usually with a fractional part. Since iOS 11 and macOS 10.13, some system databases, for example the Messages database, store nanoseconds since the same date instead, which produces 18-digit numbers. Choose the unit, or simply paste: a value too large to be seconds for any plausible date is read as nanoseconds automatically, and a note says so.

Mistaking it for Unix time

A Unix timestamp from recent years is a number around 1.7 to 1.8 billion, which as an Apple timestamp would be a date in the 2050s. When a value falls in that range, the converter warns that it may be a Unix timestamp, in which case the real date is 31 years earlier than shown. Negative values are valid and mean dates before 2001.

Working with Core Data databases

Core Data saves its stores as SQLite files with columns named like ZTIMESTAMP or ZCREATIONDATE. To read them in a query, add the offset and use SQLite’s date functions: datetime(ZTIMESTAMP + 978307200, 'unixepoch'). The converter shows that expression, ready to paste into the SQLite Viewer.

A worked example

The seconds value 783475200 converts to 2025-10-30T00:00:00.000Z. The nanosecond value 783475200000000000 gives the same moment, because it is the same count of seconds multiplied by a billion. In the other direction, the date 2026-10-30 00:00:00 UTC is 815011200 seconds since the reference date, and the nanosecond form is the same number followed by nine zeros.

Other epochs to know

Apple is not the only exception. Windows FILETIME counts from 1601 in 100-nanosecond steps, GPS time from 6 January 1980, and classic Mac OS used 1 January 1904, which still appears in some file formats and in Excel’s 1904 date system. When a converted date looks decades off, a different epoch is the usual explanation.

Precision

Seconds values are converted with millisecond precision, which matches JavaScript dates. Nanosecond values larger than about 9 × 10¹⁵ exceed the range JavaScript numbers represent exactly, so the last few digits are rounded; the date is correct to well under a millisecond, but do not rely on the converter to round-trip individual nanoseconds.

Checked against the current version of the Cocoa / Core Data Timestamp Converter on .

Frequently asked questions

How do I convert these timestamps in Python?

Add 978307200 and use the result as Unix time: datetime.fromtimestamp(ts + 978307200, tz=timezone.utc). For nanosecond values, divide by 1e9 first. Swift does the same with Date(timeIntervalSinceReferenceDate: ts).

Why do some Core Data dates have many decimal places?

Core Data stores dates as double-precision floating-point seconds, so fractions of a second are kept. The decimals are real precision for recent dates, typically down to microseconds, not an error.

How far apart are the Apple and Unix epochs?

Exactly 978,307,200 seconds: the time from 1 January 1970 to 1 January 2001 UTC. Add it to an Apple timestamp to get Unix time, or subtract it to go the other way.

Why are some Apple timestamps 18 digits long?

Since iOS 11 and macOS High Sierra, some system databases such as Messages store nanoseconds since 2001 instead of seconds. Divide by one billion first, or choose the nanoseconds unit.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.