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: Jeremy Dronfield <email@hidden>
- Date: Fri, 4 Jun 2004 11:58:10 +0100
I was under the impression (perhaps mistaken) that UTC time is
different from [NSDate date]. i.e. that it is calculated from a
different absolute reference point and has a specific standard for
representation.
Regards,
-Jeremy
On 4 Jun 2004, at 11:25 am, j o a r wrote:
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.
_______________________________________________
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.