Re: UTC->NSDate in Cocoa.Needs to be localized depending on the locale.
Re: UTC->NSDate in Cocoa.Needs to be localized depending on the locale.
- Subject: Re: UTC->NSDate in Cocoa.Needs to be localized depending on the locale.
- From: Marco Scheurer <email@hidden>
- Date: Wed, 17 Mar 2004 15:54:02 +0100
On Mar 17, 2004, at 3:14 PM, Manish Pattath wrote:
Thanks,for pointing me in the right direction Nick.
I got the localized dates depending on the locale.
Nick Zitzmann <email@hidden> wrote:
On Mar 16, 2004, at 7:30 AM, Manish Pattath wrote:
I get a date from a device in the form of 1077715270
basically UTCDateTime.
I need to extract the date and time in Cocoa ,from
this in a specific format like
Wed Apr 24,2003 \n 4:22:20 AM
That looks like a time value written in seconds since the Unix epoch.
You might want to try:
NSDate *date = [NSDate dateWithTimeIntevalSince1970:1077715270];
The origin for UTCDateTime is 1904 (January 1st, 0 hour), not 1970.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.