Representing UTC time in a readable format
Representing UTC time in a readable format
- Subject: Representing UTC time in a readable format
- From: Jeremy Dronfield <email@hidden>
- Date: Fri, 4 Jun 2004 10:59:23 +0100
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.
Regards,
-Jeremy
_______________________________________________
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.