I have an intranet running on a linux box, which authenticates against Active Directory on a Windows box, using LDAP through PHP.
I can retrieve a user's entry from AD using LDAP and access the last login date from the php array eg:
echo $adAccount['lastlogontimestamp'][0]; // returns something like 129802528752492619
If this was a Unix timestamp I would use the following PHP code to convert to a human readable date:
date("d-m-Y H:i:s", $lastlogontimestamp);
However, this does not work. Does anyone know how I can achieve this or indeed if it is possible to do so from a Linux box?