Nico
Nico

Reputation: 13

Converting IPhone timestamps

I extracted the iphone database with the gps and wifi data.
It seems that the apple timestamp is a special timestamp (313167962.508283).

How can I convert this to the linux timestamp or a real date?
If possible i want to convert it with PHP.

Upvotes: 1

Views: 1692

Answers (2)

Kevin Montrose
Kevin Montrose

Reputation: 22591

This looks like the result of NSDate timeIntervalSinceReferenceDate.

Which would make it seconds since Jan. 1st 2001 UTC, your example would be '2010-12-04 15:05:02'(-ish, I dropped partial seconds).

In php

$time = mktime('', '', '', 1, 1, 2001) + $secondsSince;

Upvotes: 0

Ole Melhus
Ole Melhus

Reputation: 1929

The time is in seconds since January 1. 2001. (ref: http://petewarden.github.com/iPhoneTracker/#2)

   $time = mktime('', '', '', 1, 1, 2001) + $appletime;

Upvotes: 1

Related Questions