Re: NSDate without time portion
Re: NSDate without time portion
- Subject: Re: NSDate without time portion
- From: Karolis Ramanauskas <email@hidden>
- Date: Tue, 5 Jan 2010 14:26:39 -0600
>
> NSDate conceptually store time relative to Jan 1, 2001, GMT.
>
> When it is formatted for display, it uses the current time zone (or more
> correctly, the NSDateFormatter uses whatever time zone has been specified,
> or the current system time zone). If your time zone changes (such as by
> daylight savings time, or changing the location), the resulting date will
> print differently, but timeIntervalSinceReferenceDate will be unchanged. It
> is ultimately the date formatter that handles time zones, daylight savings
> time, etc...
HA!, Thanks, I see...
Either way though, If I choose to store the date as a string somewhere, I
would need to store time zone, as this is a lossy way of storing a date. Of
course it may be good to store the date as time relative to Jan 1, 2001,
GMT.
_______________________________________________
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