Apple Mac and Unix timestamps

前提是你 提交于 2019-12-02 11:27:23

问题


I know that the primary timestamp on Apple systems is the CF Absolute Time value (also called Mac Absolute Time), which is a 32-bit integer calculated by the number of seconds since 01/01/2001 00:00:00 UTC. For example, 219216022 when decoded is Thu, 13 December 2007 05:20:22 UTC.

Are there any other timestamps used on Mac/Unix systems (other than the default Unix timestamp which is a 32-bit integer calculated in seconds since 01/01/1970 00:00:00 UTC)?


回答1:


The NSDate object has timeIntervalSince1970, but that's based off the mach time. Meaning [[NSDate date] timeIntervalSince1970]-NSTimeIntervalSince1970 is equal to [NSDate timeIntervalSinceReferenceDate];




回答2:


Yes. As pointed out by @MarcusJ, the the AIFF Specification has a 32-bit binary timestamp that on the Amiga is the number of seconds since January 1, 1978, and on the Mac is the number of seconds since January 1, 1904.



来源:https://stackoverflow.com/questions/6864798/apple-mac-and-unix-timestamps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!