• 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: NSCalendar bug.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendar bug.


  • Subject: Re: NSCalendar bug.
  • From: Deborah Goldsmith <email@hidden>
  • Date: Mon, 5 Feb 2007 13:40:27 -0800

The problem with 2038 is due to the underlying time zone support in BSD using 32-bit values to represent the time. This was corrected during 2006 by the Olson (zoneinfo) time zone database adopting a 64 bit time type. I don't know when BSD is going to pick that up. ICU already supports times beyond 2038.

I'd suggest filing two bugs:
1. BSD time zone support should support times beyond 2038.
2. NSTimeZone should support times beyond 2038.

Deborah Goldsmith
Internationalization, Unicode liaison
Apple Inc.
email@hidden

On Jan 31, 2007, at 11:59 PM, Half Activist wrote:

That's true, but actually I did not find if wether this is a bug or not, because I couldn't understand why if I compare dates within the same 04/01-10/31 range
on years prior to 2039 it works fine.
On the other hand, this really seems to be daylight saving time related, or it wouldn't not happen for this interval, maybe is it as Daborah Goldsmith said
a 32bit time problem and some part of the NSCalendar subsystem (maybe ICU?) that fails to compute dst accurately for yeard beyond 2039?
Well the question is still open.


However, I didn't post back because this bug wasn't really annoying me, I didn't know if this was really a bug, you see, I don't wanna make people think there's a bug in nscalendar if there's no problem actually, but only me misinterpreting the results of some functions.

So, I was personally rewriting a calendar date set of functions - that wouldn't use objects, just c structures - and used nscalendar + nsdate/nscalendardate to check the results.
To compute the number of full days between two NSDate objects, the first approach I used, while keeping NSDate subclasses for dates is to compute a rounded number of days based on the time interval in seconds between two dates, and allow for a 1 hour error, because in any case, a time span has an odd number of dst changes so there is
a 1H difference in the time difference, or this number is even and there is no problem.





On Feb 1, 2007, at 12:10 AM, Uli Kusterer wrote:

Am 31.01.2007 um 10:03 schrieb Half Activist:
Thanks for the various advices, hints, ideas you sent and the time you spent on it.

Hi Half,

it would be nice if you shared whether any of them solved your problem (or at least explained it). Someone else might run into the same problem and arrive in this thread via Google and be really frustrated if he finds a lot of guesses and no answer... :-)

Cheers,
-- M. Uli Kusterer
http://www.zathras.de




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: MSSQL
  • Next by Date: Re: MSSQL
  • Previous by thread: Re: MSSQL
  • Next by thread: NSBitmapImageRep from tiff NSData bug?
  • Index(es):
    • Date
    • Thread