NSDate, NTP, and carrier time

前端 未结 1 1648
星月不相逢
星月不相逢 2021-02-10 05:41

I just read in the docs that:

Cocoa implements time according to the Network Time Protocol (NTP) standard, which is based on Coordinated Universal Time.

1条回答
  •  生来不讨喜
    2021-02-10 06:08

    iOS is getting time from different sources, one of them is the NTP. Ideally the time is updating from the GPS - which is the most accurate time that you can get (it's an atomic clock basically), or from the carrier (through the NITZ). Otherwise, the device falls on the NTP. Lastly, when you plug in your device to iTunes, your time is being updated as well. So Cocoa touch differs in that it has both the GPS and the carriers that Cocoa doesnt have.

    0 讨论(0)
提交回复
热议问题