From: Al L. <al....@fn...> - 2002-02-13 16:42:21
|
Chris Fedde wrote: > > On Wed, 13 Feb 2002 10:12:19 -0600 Al Lilianstrom wrote: > +------------------ > | Chris Winters wrote: > | > > | > From: > | > > | > my $time_sec = get_epoch_seconds(); > | > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) > | > = localtime( $time_sec ); > | > > | > To: > | > > | > use Time::Local; > | > my $time_sec = timelocal($sec,$min,$hours,$mday,$mon,$year); > | > | Chris, > | > | Thanks for the snippets - a little simpler than I was using. The problem > | is that perl will output 1016085600 for the date of march 14th, 2003. > | The value AD is looking for is 126606456000000000 for that same date. > | It's this large integer part that had me confused. > +------------------ > > This is confusing. Your initial spec says "number of seconds elapsed > since 00:00:00, January 1, 1970". But your example 126606456000000000 is > much much too large. What is the name and OID of the attribute that you > are trying to set? I am trying to set accountExpires 1.2.840.113556.1.4.159 The syntax is Integer8 Where did these numbers came from? 1016085600 is the number of seconds from the epoch for the date of March 14, 2003. If I set an account in AD for a expiration date of March 14, 2003 and then dump the account to ldif the value of accountExpires is 126606456000000000. Now the strange part - I just added a user with the 1016085600 value and the expiration date was set properly. I'm real confused now. al -- Al Lilianstrom CD/OSS/CSI Al....@fn... |