Getting system time in iPhone
I know that there is a method [NSDate date] which returns current date and time from iPhone clock. But if this clock time was changed开发者_StackOverflow社区 manually it would rune my code. Is there any opportunity to get world time, not current time from iPhone?
Yes, you can have correct current time by using ntp/sntp.
Following uris might help you to write your own implementation:
Simple NTP client for iOS : http://code.google.com/p/ios-ntp/
NSDate from time server: http://pathoneycutt.com/2010/12/nsdate-from-time-server/
精彩评论