Re: NSCalendar date calculation anomaly
Re: NSCalendar date calculation anomaly
- Subject: Re: NSCalendar date calculation anomaly
- From: Matt Gough <email@hidden>
- Date: Wed, 28 Apr 2010 15:45:08 +0100
On 28 Apr 2010, at 15:37:59, Scott Ribe wrote:
> On Apr 28, 2010, at 1:04 AM, Kubernan wrote:
>
>> Did you try to use NSDateComponents for building your reference date (2001/01/01) such as :
>
> No, reasonable idea though. But even better, I should have been logging the reference date after I created it. When I do that, I get:
>
> 2000-12-31 17:00:00 -0700
>
> Which is correct, midnight at UTC. Then I add 3,412 days and I get:
>
> 2010-05-05 17:00:00 -0600
>
> Which is off by an hour. So the problem seems to be with the addition, not with the creation of the reference date.
>
Not read all the rest of the posts, but isn't that due to Daylight savings being different in December and May?
Matt_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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