I can't seem to find instructions to get off this list anywhere. Please
help.
~rlp
-----Original Message-----
From: Chris Ridd [mailto:chr...@ma...]
Sent: Wednesday, October 16, 2002 7:57 AM
To: Mar...@ml...; per...@li...
Subject: Re: Problems with UTC Timestamp
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
-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
|