开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜