Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.