def DecodeFATTime(FATdate, FATtime):
    """Convert the 2x16 bits of time in the FAT system to a tuple"""
    day = FATdate & 0x1f
    month = (FATdate >> 5) & 0xf
    year = 1980 + (FATdate >> 9)
    sec = 2 * (FATtime & 0x1f)
    min = (FATtime >> 5) & 0x3f
    hour = FATtime >> 11
    return (year, day, month, hour, min, sec)