[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: date/time attributes



Howard Chu wrote:

GeneralizedTime can be pretty inconvenient when all you want to store is a date (for a birthday, etc.) or only a time.

Yupp!

There doesn't appear to be any standardized syntax just for these
purposes.

Let's refine this statement: There doesn't appear to be any standardized *LDAP* syntax just for these purposes. There is ISO 8601 though.


E.g., if all you want is for your calendar to remind you of someone's birthday, you just need it to tell you on that given day. Your calendar program might put up an alert at 00:01 local time on that date. But "00:01 local time" is a floating time, while GeneralizedTime requires a specific time zone...

The problem for a birthday is that you don't know the time and the time zone of the birth and you don't know the timezone in which to interpret (match) the date of birth. So I'm just using the simple date form with dashes of ISO 8601 (YYYY-MM-DD) which is a standardized syntax and readable just as is.


http://en.wikipedia.org/wiki/ISO_8601#Calendar_dates

There has been some opinions to use the date form without dashes to be able to restrict the attribute values to numbers by using LDAP syntax 'Numeric String'. But IMHO that's less user-friendly/readable.

Ciao, Michael.