Hi,
I have a LDAP Active Directory LastLogon timestamp that I'm trying to convert to human-readable date.
I've tried using UnixDate, ParseDate and other perl modules with no success. The reason being the timestamp(I guess the bits being used) in LDAP is different from Unix timestamps.
I'd really appreciate any ideas.
Here is an example: lastLoginTime is being read from LDAP Active Directory LastLogon attribute which can be
lastLoginTime = 127185822896362317
%my $date_format = '%a, %b %e %Y at %i:%M%p';
%my $lastLoginDate = &UnixDate(Date::Manip::ParseDateString("epoch ".$lastLoginTime), $date_format);
Last Login: The user last logged into the account on
<% $lastLoginDate %>
The lastLoginDate being printed is Tue Dec 30, 1969 at ...
Where as, the actual date of last login is 1/14/2004 2:31:29 PM
Thanks for the help
I have a LDAP Active Directory LastLogon timestamp that I'm trying to convert to human-readable date.
I've tried using UnixDate, ParseDate and other perl modules with no success. The reason being the timestamp(I guess the bits being used) in LDAP is different from Unix timestamps.
I'd really appreciate any ideas.
Here is an example: lastLoginTime is being read from LDAP Active Directory LastLogon attribute which can be
lastLoginTime = 127185822896362317
%my $date_format = '%a, %b %e %Y at %i:%M%p';
%my $lastLoginDate = &UnixDate(Date::Manip::ParseDateString("epoch ".$lastLoginTime), $date_format);
Last Login: The user last logged into the account on
<% $lastLoginDate %>
The lastLoginDate being printed is Tue Dec 30, 1969 at ...
Where as, the actual date of last login is 1/14/2004 2:31:29 PM
Thanks for the help