Created
June 21, 2012 14:18
-
-
Save zvineyard/2966002 to your computer and use it in GitHub Desktop.
PHP: Convert File Timestamp to Unix Timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function file_to_unix_time($file_time,$round=true) { | |
if ($round) { | |
return round(($file_time - 116444736000000000) / 10000000); | |
} | |
return ($file_time - 116444736000000000) / 10000000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment