Posted By

cllorca on 03/10/09


Tagged

date utc windows directory active timestamp ldap epoch


Versions (?)

Convert Windows UTC time to Unix epoch


 / Published in: PHP
 

URL: http://chrisllorca.com

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.

  1. function convert_windows_time_to_unix($wintime) {
  2. return $wintime / 10000000 - 11644473600;
  3. }

Report this snippet  

You need to login to post a comment.