Re: Representing UTC time in a readable format
Re: Representing UTC time in a readable format
- Subject: Re: Representing UTC time in a readable format
- From: j o a r <email@hidden>
- Date: Fri, 4 Jun 2004 12:25:08 +0200
Why not simply:
[[NSDate date] description]
???
j o a r
On 2004-06-04, at 11.59, Jeremy Dronfield wrote:
>
I'd like to be able to insert a time readout represented as UTC time
>
in my text. Since there doesn't appear to be a Cocoa way to do it, I'm
>
doing this to get the UTC date/time:
>
>
UTCDateTime *utcDateTime;
>
OSStatus error = GetUTCDateTime((UTCDateTime *)&utcDateTime,
>
kUTCDefaultOptions);
>
UInt16 high = utcDateTime->highSeconds;
>
UInt32 low = utcDateTime->lowSeconds;
>
>
NSLog(@"utcDateTime:%qu", utcDateTime);
>
NSLog(@"high:%hu", high);
>
NSLog(@"low:%u", low);
>
>
which gives me a log output like this:
>
>
utcDateTime:207691733533048
>
high:997
>
low:3040632576
>
>
How can I translate this into a standard human-readable representation
>
of UTC time? I'm not clear about the relationship between the high and
>
low bits, and which I should use.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.