开发者

Time format in iPhone Photos.sqlite

开发者 https://www.devze.com 2023-03-31 10:16 出处:网络
I copied pictures from my iPod Touch into my Mac using iPhone Explorer, but in doing so their timestamps got modified. I am not an iOS programmer, but I managed to get to the data in Photos.sqlite

I copied pictures from my iPod Touch into my Mac using iPhone Explorer, but in doing so their timestamps got modified. I am not an iOS programmer, but I managed to get to the data in Photos.sqlite

In User/Media/PhotoData/Photos.sqlite on my iPod Touch, I see the keys captureTime开发者_如何学Go and recordModDate. The titles seem self explanatory. However, how do I translate their values into a human-readable format? e.g. 307867854.0 (captureTime) and 330936323.440785 (recordModDate). It doesn't seem to be in epoch.


Your times are the number of seconds since January 1, 2001.

The code to display the date would be something like:

NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceReferenceDate: 330936323.440785];
NSLog( @"%@", date );

prints 2011-06-28 06:45:23 +0000

0

精彩评论

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