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

Re: attributetype 'date' syntax



On Mon, May 19, 2003 at 06:28:56PM +0200, Pierangelo Masarati wrote:
> 
> > Ron Peterson writes:
> >> Is there a common syntax for defining a 'date' type attribute?
> >
> > Generalized Time, OID 1.3.6.1.4.1.1466.115.121.1.24.
> >
> > Format: yyyymmddHHMMSSzone,
> >   where zone is "Z" which means Coordinated Universal Time (equivalent
> > to Greenwich Mean Time), or "-HHMM", or "+HHMM".
> >
> > Actually the minute and second components are optional, and you can also
> > have a fraction of a second, but I'm not sure if OpenLDAP supports the
> > full syntax.
> 
> As far as I remember, OpenLDAP does not admit optional values,
> e.g. everything is required.  You can find helper routines to
> generate generalized time in libraries/liblutil/utils.c, and
> of course the corresponding validation/normalization code in
> servers/slapd/schema_init.c; if not present, we could modify
> validation/normalization routines to accept formats with missing
> optional portions...

Thanks guys.  I want to create a 'birthday' attribute type.  For now, I
think I'll just zero all the non-date portions of the generalized time
structure.  The 'check_time_syntax' function in schema_init.c seems to
be the place to loosen the validation restrictions.  I might do that
later, but at the moment it would be a distraction...

Again, thanks for the info.

-- 
Ron Peterson                          -o)
Network & Systems Manager             /\\
Mount Holyoke College                _\_v
http://www.mtholyoke.edu/~rpeterso   ----