• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Obtaining current date from time.apple.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining current date from time.apple.com


  • Subject: Re: Obtaining current date from time.apple.com
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 13 Apr 2005 15:12:01 -0700


On Apr 13, 2005, at 11:57 AM, M. Carlson wrote:

[NSDate date] returns only the current system time. I would like to access an NTP server such as time.apple.com to obtain the current time. What is the Cocoa way to do this?

Ordinarily, you'd have the system prefs set to synchronize with an NTP server. If you want to do it manually, you can look up the RFC's for the NTP protocol, and use NSStream to talk to the host of your choice.


-jcr


John C. Randolph <email@hidden> (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Obtaining current date from time.apple.com
      • From: Daniel Waylonis <email@hidden>
References: 
 >Obtaining current date from time.apple.com (From: "M. Carlson" <email@hidden>)

  • Prev by Date: Re: Determining if a special input method is active - was Detecting double byte input
  • Next by Date: Re: Cocoa from C++ (dont want to mix it)
  • Previous by thread: Obtaining current date from time.apple.com
  • Next by thread: Re: Obtaining current date from time.apple.com
  • Index(es):
    • Date
    • Thread