From: Chris R. <chr...@ma...> - 2002-10-16 12:57:17
|
On 16/10/02 12:52 pm, Mar...@ml... <Mar...@ml...> wrote: > Hi, > > i have problems with an attribute that uses the syntax utc time syntax. > i generate the time with the following code line > > #Timestamp > $timestamp = `date +%y%m%d%H%m%SZ`; The second %m should probably be a %M (minutes, not months!) > when i try to add the content to the utc time atrtibute with > > $ldap->modify( $dnldap, replace => {IPTimestamp => $timestamp}); > > i alway get an error in the log like 'invalid syntax' > > 2002-10-16-13:43:54.019+00:00--V2 Modify--bindDN: xxx --client: xxx > :7809--connectionID: 2--received: 2002-10-16-13:43:54.015+00:00--Invalid > syntax > > can anyone help me and tell me where the failure is ? am i generating the I think you're constructing the value OK, though you haven't given any examples of values for me to be sure. According to X.680 which defines the UTCTime ASN.1 type, values must follow one of these templates: YYMMDDhhmm YYMMDDhhmmss YYMMDDhhmmZ YYMMDDhhmmssZ YYMMDDhhmm+hhmm YYMMDDhhmm-hhmm YYMMDDhhmmss+hhmm YYMMDDhhmmss-hhmm The last 4 variants specify a timezone offset, the Z variants mean coordinated universal time, and the other variants are local time. > timestamp in a wrong way ? is there another possibility to generate a > timestamp I would be tempted to call POSIX::strftime in your script instead of using backticks to call a Unix command. It will be more efficient (no fork/exec) and it will let your script work on Windows. > is the way i fed the ldap wrong ? Try putting the value in an arrayref, ie: replace => { IPTimestamp => [ $timestamp ] } > many thanks for help > greetings > > Martin Cheers, Chris |