Re: NSCalendarDate has subsecond precision
Re: NSCalendarDate has subsecond precision
- Subject: Re: NSCalendarDate has subsecond precision
- From: Quincey Morris <email@hidden>
- Date: Fri, 15 Aug 2008 14:51:31 -0700
On Aug 15, 2008, at 14:28, Jim Thomason wrote:
First of all, the origin of this. I had a little method that returns
"today at midnight". Basically, I just created an NSCalendarDate
object with [NSCalendarDate date] and subtracted off the current
hours, minutes, and seconds to yield today with time values of
00:00:00. That worked just fine, and for today (for example), I got a
nice value back of: 2008-08-15 00:00:00 -0500.
Incidentally, this was never the right strategy, even if
NSCalendarDate dealt in whole seconds. It would give you the wrong
answer (for example) on any day when daylight savings time changed.
_______________________________________________
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