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

Re: how use lastmod to track last modify time

søn, 2002-11-24 kl. 13:02 skrev Peter Marschall:

> On Saturday 23 November 2002 19:50, Tony Earnshaw wrote:
> > > There is no need to add modifyTimestamp to the schema. It is already
> > > there.
> > In 2.1.8, at least, it is commented out (together with other "modifies")
> > as obsolete.

> Although it may be commented out in the schema files, it is in the code !


> > > modifyTimestamp, the attribute influenced by setting lastmod (as "man
> > > slapd.conf" states), is an operational attribute. You have to
> > > explicitely ask for it in ldapsearch.
> > How would you do this (don't say "man ldapsearch")? Further, how would
> > you do it in PHP4?

> Here is an example:
>     ldapsearch -h server.domain  -b o=Base-DN -D cn=Bind-DN -W -x \ 
>     '(objectclass=*)' modifyTimestamp

O.k., but supposing I want to find all (modifyTimestamp)s more/greater
than 20021108214351Z or 200211082143* ? I *did* try a few different
filters, but it ain't happy. Doesn't surprise me, though, 'cos this kind
of thing won't work with normal filters, either (integer comparison
doesn't work).

> Unfortunately, I do not use PHP. In Perl, it is as simple as giving the
> "attrs" option with the appropriate attribute names to the search() method.

Yes, but with the same limitation. I suppose I'd have to extract the
values and feed them into normal, non-ldap constructs.




Tony Earnshaw

When all's said and done ...
there's nothing left to say or do.

e-post:		tonni@billy.demon.nl
www:		http://www.billy.demon.nl