Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSSM_DATE - is it GMT time?




On May 21, 2006, at 7:13 AM, email@hidden wrote:

It looks like in Tiger [at least] the Security framework is treating CSSM_DATE as being GMT, not local timezone. Makes sense; I just want to confirm that's the case. I've got some code which just suddenly failed once the clock struck midnight (I'm GMT+1000), and that seems to be why.

Yes, CSSM dates are in GMT/UTC. You've probably noticed that CSSM_DATE, defined in section 13.2.3 of the CDSA standard, has a granularity of only 1 day(!), e.g. '20060522', and can't specify a timezone or offset. It's definitely a limitation. For a date specified as a CSSM_DATE, a time of 12:00:00 AM GMT is assumed.


If you dump out the contents of a keychain, you'll notice that dates are stored internally in UTC format (e.g. '20060522110749Z'), containing minutes and seconds when they are available. (The terminating 'Z' character indicates 'Zulu time', or GMT.)

-ken

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden
References: 
 >CSSM_DATE - is it GMT time? (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.