I noticed that if I set my device time manually, and turn off the automatic time sync on my iOS device, [NSDate date]
returns the date and time assuming the device time is correct--which it may not be.
Since the docs mention that NSDate
has some sort of sync with NTP, I am wondering if there is any built-in way to get the accurate date and time instead of having to assume the device date and time is correct.
Perhaps https://github.com/jbenet/ios-ntp can help you? It's a library that can fetch the date and time from a time server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With