Return to Snippet

Revision: 12328
at March 10, 2009 20:32 by cllorca


Initial Code
function convert_windows_time_to_unix($wintime) {
   return $wintime / 10000000 - 11644473600;
}

Initial URL
http://chrisllorca.com

Initial Description
This function simply takes a Windows UTC timestamp and converts it to Unix epoch.
This was useful when I was pulling LDAP information from Active Directory and the timestamps were ridiculous. Windows builds timestamps by counting seconds since January 1 1601.

Initial Title
Convert Windows UTC time to Unix epoch

Initial Tags
date, windows, directory

Initial Language
PHP