Sebastian Cabrera wrote: > > I need some help writing a little script doing some LDAP queries to a > Windows Active Directory. > Querying the value of the time when the password was last set i just get > the Windows timestamp. > Is there any way to convert it into a readable format? > I'm running the script on a linux machine.
The login time you are retrieving should be a FILETIME structure, which is a 64-bit value giving the number of 100ns ticks since 00:00 1 Jan 1601. http://msdn.microsoft.com/en-us/library/ms724284(VS.85).aspx The structure is defined as a pair of 32-bit DWORDs, and I hope that is what you are getting as your copy of Perl is unlikely to be able to handle 64-bit integers. As for converting the time to something readable, the only code I know that does something comparable is the Win32API::File::Time. You will not be able to use it directly, but the module's code will help you to find your own solution. HTH, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/