Re: NSDate description in Lion shows GMT instead of local time
Re: NSDate description in Lion shows GMT instead of local time
- Subject: Re: NSDate description in Lion shows GMT instead of local time
- From: Clark Cox <email@hidden>
- Date: Fri, 26 Aug 2011 07:46:49 -0700
On Fri, Aug 26, 2011 at 12:38 AM, Gerriet M. Denkmann
<email@hidden> wrote:
>
> The documentation says about -[NSDate description]: "The representation is not guaranteed to remain constant across different releases of the operating system."
That really says it all right there.
> NSLog(@"someDate: %@", someDate );
> Formerly did print the time in the local time zone. Which is a very sensible thing to do.
Yes, but it led to a lot of confusion. I.e. a lot of developers
thought that NSDate contained timezone information; it does not. Under
the covers, NSDate is nothing more than a number representing the
seconds elapsed since the epoch--no timezone, no calendar system, no
daylight savings, etc.
--
Clark S. Cox III
email@hidden
_______________________________________________
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