This file contains 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
/** Converts DOS time to Unix time */ | |
function dosToUnixTime($dosTime) { | |
$date = mktime( | |
(($dosTime >> 11) & 0x1f), // hours | |
(($dosTime >> 5) & 0x3f), // minutes | |
(($dosTime << 1) & 0x3e), // seconds | |
((($dosTime >> 21) & 0x0f) - 1), // month | |
(($dosTime >> 16) & 0x1f), // day | |
((($dosTime >> 25) & 0x7f) + 1980) // year | |
); |