简体   繁体   English

在不同设备中调用timeIntervalSince1970

[英]Calling timeIntervalSince1970 in different devices

From the following links, does it mean that if calling timeIntervalSince1970 in different devices at SAME TIME(theoretically), the timestamp will be the same? 从以下链接开始,这是否意味着如果在同一时间(理论上)在不同设备中调用timeIntervalSince1970 (理论上),时间戳将是相同的?

Thanks! 谢谢!

timeIntervalSince1970 is the number of seconds since 1 January 1970, GMT and therefore independent of the devices time zone, the chosen date format etc. So theoretically, if the clocks of two devices were completely in sync, the value of timeIntervalSince1970是格林尼治标准时间(GMT)自1970年1月1日以来的秒数,因此不受设备时区,所选日期格式等的影响。因此,从理论上讲,如果两个设备的时钟完全同步,则

[[NSDate date] timeIntervalSince1970]

would be the same at the same absolute point in time. 在相同的绝对时间点相同。

In practice, there will always be a difference. 实际上,总会有区别。 The device clock is never 100% correct, and a user can even disable the automatic time synchronisation and set an arbitrary time manually. 设备时钟永远不会100%正确,用户甚至可以禁用自动时间同步并手动设置任意时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM