Re: NSCalendar date calculation anomaly
Re: NSCalendar date calculation anomaly
- Subject: Re: NSCalendar date calculation anomaly
- From: Scott Ribe <email@hidden>
- Date: Wed, 28 Apr 2010 08:23:27 -0600
On Apr 28, 2010, at 8:11 AM, glenn andreas wrote:
> MDT is -0600 so this is correct - MST is -0700. (stupid "spring forward, fall back" clock resetting...
You're right about that (I was tired), but it's a read herring, the values are still wrong. Reference date is at midnight 1/1/2010 UTC, add integral days to it, the result should still be at midnight UTC.
> I find that dealing with dates and time zones it's best to consider NSDate to be just a scalar value, with a separate time zone (and optional calendar) being the "unit". It's up to the formatter used to display that (scalar) date in the desired unit.
Well, this often works, but when you add days and it shifts the time back an hour, it doesn't work.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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