• 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
NSDate feature request
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDate feature request


  • Subject: NSDate feature request
  • From: Malte Tancred <email@hidden>
  • Date: Fri, 24 May 2002 10:03:58 +0200

Hi!

The documentation for Date and Time in Cocoa states that "[the internal implementation] do not account for leap seconds and therefore are not synchronized with International Atomic Time (the most accurate)."

I've investigated this a bit and, to be short, it seems that the reason for this is the constant NSTimeIntervalSince1970. The value represents the number of seconds elapsed between 1970-01-01 00:00:00 +0000 and the NSDate reference date 2001-01-01 00:00:00 +0000.

I've written some about it in my blog:

http://www.tancred.com/cgi-bin/blosxom/2002/May/17#taiutccocoa

If the constant were replaced by a function that calculated the number of seconds between the unix epoch and the Cocoa reference date, NSDate would probably operate exactely as the time() system call.

That is, if you updated your zonefiles, NSTimeIntervalSince1970 would return the correct number of seconds, including leapseconds.

Just a thought.

Cheerio,
Malte
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Stop this thread (was: Flame retardant)
  • Next by Date: Re: C++ Strings Handling
  • Previous by thread: Re: C++ Strings Handling
  • Next by thread: Re: cocoa-dev digest, Vol 2 #682 - 12 msgs
  • Index(es):
    • Date
    • Thread