There are different notations used to designate date and time-related information. For example, the fourth day of February in the year 1999 can be written as:
as well as many other notations.
Directory Server standardizes the timestamp representation by requiring the LDAP servers to support two syntaxes:
- The Generalized Time syntax, which takes the form:
There are 4 digits for the year, 2 digits each for the month, day, hour, minute, and second, and an optional fraction of a second. Without any further additions, a date and time is assumed to be in a local time zone. To indicate that a time is measured in Coordinated Universal Time, append a capital letter Z to a time or a local time differential. For example:
which in local time is 6 minutes, 27.3 seconds after 9 p.m. on 6 November 1999.
which is the coordinated universal time.
which is local time as in the first example, with a 5 hour difference in relation to the coordinated universal time.
If you designate an optional fraction of a second, a period or a comma is required. For local time differential, a ‘+’ or a ‘-‘ must precede the hour-minute value
- The Universal time syntax, which takes the form:
YYMMDDHHMM[SS][(+ | -)HHMM)|Z]
There are 2 digits each for the year, month, day, hour, minute, and optional second fields. As in GeneralizedTime, an optional time differential can be specified. For example, if local time is a.m. on 2 January 1999 and the coordinated universal time is 12 noon on 2 January 1999, the value of UTCTime is either:
If the local time is a.m. on 2 January 2001 and the coordinated universal time is 12 noon on 2 January 2001, the value of UTCTime is either:
UTCTime allows only 2 digits for the year value, therefore the usage is not recommended.
The supported matching rules are generalizedTimeMatch for equality and generalizedTimeOrderingMatch for inequality. Substring search is not allowed. For example, the following filters are valid:
The following filters are not valid: