Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There doesn't appear to be a standard date syntax. How do people handle entering dates into ldap so that they are comparable and invalid data can't be entered? I'm hoping to enforce a fairly standard format such as YYYY-mm-dd. Other people have to have done this before but I can't seem to find anything. Anyone have suggestions or links?

share|improve this question
up vote 0 down vote accepted

There doesn't appear to be a standard date syntax.

The standard representation of time/date information uses the "generalized time" syntax, defined in RFC 4517. This is used by OpenLDAP, Active Directory, other directory servers, and elsewhere.

share|improve this answer
So people normally just zero out the time fields? No way to do dates only? – Brad Mace Jan 19 '11 at 3:35
That would seem to be the logical way of handling it. There is of course no requirement that you use this particular standard. If you're writing your own application, you can pick your own format and do you own data validation, so it doesn't matter all that much. – larsks Jan 19 '11 at 4:00
I may want to be able to use some of them in search filters so I guess I'll go with the standard unless there's a way I can define my own matching rules. – Brad Mace Jan 20 '11 at 16:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.