将Windows UTC时间转换为Unix epoch

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将Windows UTC时间转换为Unix epoch相关的知识,希望对你有一定的参考价值。

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. }

以上是关于将Windows UTC时间转换为Unix epoch的主要内容,如果未能解决你的问题,请参考以下文章