On 6/4/04 12:40 pm, Claude <[EMAIL PROTECTED]> wrote: > I need to create a search filter containing comparaison to a > modifyTimestamp value. Someting like: > > (&(modifyTimestamp>=20040325161257Z)(|(objectClass=XX)(objectClass=YY))) > > The data type syntax ("Generalized Time") is close to what 'date' can > output: > > $ date '+%Y%m%d%k%M%S' > 20040406130637 > > And I could copy this string to my filter, after appending the "Z" to > the end. > > Now, what about if the timestamp is something like what can be found > from the access log, ie. > > 25/Mar/2004:13:02:31 -0200 > > Can I convert this date to the "Generalized Time" format using the > convert::ASN1 module?
Convert::ASN1 doesn't provide any data format conversion utilities, so you'll need to construct the GeneralizedTime values yourself. You might need to play with the timezone offset if your directory server can't handle this valid form of GeneralizedTime: 20040325130231-0200 Cheers, Chris