[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Slapd strftime(3) ISO-8601 patch
If you are using this timestamp in the CreateTimeStamp or
ModifyTimeStamp attributes, I believe this change violates the LDAP
standard. RFC2252 refers to the ASN.1 standards for the definition of
GeneralizedTime and UTCTime. ASN.1 refers to ISO-8601, but explicitly
disallows the use of separators.
Moreover, RFC2252 requires the specification of a time zone, and
"strongly recommends" that GMT time be used.
So, if you choose to use this patch, be aware that conforming clients
may not behave correctly.
> -----Original Message-----
> From: patl@phoenix.volant.org [mailto:patl@phoenix.volant.org]
> Sent: Friday, October 16, 1998 5:03 PM
> To: openldap-general@openldap.org
> Subject: Slapd strftime(3) ISO-8601 patch
>
>
> The attached patch modifies slapd to make the generated timestamp
> strings conform with ISO-8601. It also includes the expansion of
> the year from two to four digits and the use of a more human-readable
> format.
>
> A macro has been added to the top section of ldapconfig.h.edit to
> allow a user to choose whether to use UTC or local time. Two more
> macros defined in the SLAPD section based on the choice. One expands
> to either 'localtime' or 'gmtime', the other to the strftime(3)
> format string.
>
> The SLAPD_STRFTIME_FORMAT values in the patch insert the punctuation
> characters allowed by ISO-8601 to increase readability. When UTC is
> chosen, the 'Z' timezone qualifier will be used. Since few if any
> current implementations of strftime(3) have a format specifier for
> the offset notation, local time is presented with no timezone
> indicator.
> (ISO-8601 allows this as an unspecified offset from UTC.)
>
> Since the format strings are in macros in a config file, I increased
> the size of the time string buffers significantly more than was
> actually necessary.
>
> NOTE that since the slapd ldbm back-end stores the time values in
> ASCII, this patch will not affect any values which are already in
> your database(s).
>
> These diffs were taken against stable-980929 with my previously
> posted UID changes. The patches do not directly overlap; but
> the line numbers in the ldapconfig.h.edit diffs will be slightly
> off from an unpatched version.
>
>
>
> -Pat
>