def DosDateTimeToTimeTuple(dosDateTime):
 dosDate = (dosDateTime >> 16)
 dosTime = (dosDateTime & 65535)
 day = (dosDate & 31)
 month = ((dosDate >> 5) & 15)
 year = (1980 + (dosDate >> 9))
 second = (2 * (dosTime & 31))
 minute = ((dosTime >> 5) & 63)
 hour = (dosTime >> 11)
 return time.localtime(time.mktime((year, month, day, hour, minute, second, 0, 1, (-1))))

def DosDateTimeToTimeTuple ( dosDateTime ) : dosDate = ( dosDateTime >> 16 ) dosTime = ( dosDateTime & 65535 ) day = ( dosDate & 31 ) month = ( ( dosDate >> 5 ) & 15 ) year = ( 1980 + ( dosDate >> 9 ) ) second = ( 2 * ( dosTime & 31 ) ) minute = ( ( dosTime >> 5 ) & 63 ) hour = ( dosTime >> 11 ) return time . localtime ( time . mktime ( ( year , month , day , hour , minute , second , 0 , 1 , ( - 1 ) ) ) )
convert an ms-dos format date time to a python time tuple .