开发者

Converting IPhone timestamps

开发者 https://www.devze.com 2023-02-27 11:40 出处:网络
I extracted the iphone database 开发者_运维技巧with the gps and wifi data. It seems that the apple timestamp is a special timestamp (313167962.508283).

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.


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

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


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;
0

精彩评论

暂无评论...
验证码 换一张
取 消