Re: NSCalendar bug.
Re: NSCalendar bug.
- Subject: Re: NSCalendar bug.
- From: Half Activist <email@hidden>
- Date: Thu, 1 Feb 2007 08:59:21 +0100
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