View Full Version : Windows 2000 Server / Active Directory timestamp

08-30-2005, 01:41 PM
Hello, when I get data with PHP from Active Directory, there is a key named "lastlogon" with the value "127698735878906250". I guess this is a some kind of Windows timestamp. Does somebody know, how to convert it to human-readable format?

10-05-2009, 07:43 AM
you may have already found out how this works, or don't care anymore...
Microsoft calculates timestamps in 100 nanoseconds from 01.01.1601 00:00AM.
With knowing this there are a lot of ways getting a correct readable time.
One way definitly is doing some thinking and writing your own script, but there are some scripts and webpages who did this before:

Visual Basic: http://techtasks.com/code/viewbookcode/1607
Active Directory Plugin [German webpage, but english plugin, I think]: http://blog.dikmenoglu.de/PermaLink,guid,f75a75e7-f160-423e-af19-65a259ca559c.aspx

The fast way: calculate in web [English/German]: www.redhelp.de

hopefully this helps someone