Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Turns date/time members from a FileRecord into unix time 

        def fat2unixtime(t, d):
    """ Turns date/time members from a FileRecord into unix time """
    # Not currently accurate past 2 seconds
    # TODO: Millisecond accuracy
    # FAT times are generally UTC on disk
    a = parse_fat_time(t)
    b = parse_fat_date(d)
    return time.mktime((1980 + b[2], b[1], b[0], a[0], a[1], a[2], 0, 0, 0))
        


src/p/y/py360-HEAD/report360.py   py360(Download)
            if fi.fr:
                self.output("File: %s\t%d" % (filename, fi.fr.fsize))
                self.output("%s\t%s\t%s\n" % (time.ctime(xboxtime.fat2unixtime(fi.fr.mtime, fi.fr.mdate)),\
                                            time.ctime(xboxtime.fat2unixtime(fi.fr.atime, fi.fr.adate)),\
                                            time.ctime(xboxtime.fat2unixtime(fi.fr.ctime, fi.fr.cdate))))
        for filename in stf.allfiles:
            fl = stf.allfiles[filename]
            self.output("%s\t%s\t %d\t %s " % (time.ctime(xboxtime.fat2unixtime(fl.utime, fl.udate)),\
                                        time.ctime(xboxtime.fat2unixtime(fl.atime, fl.adate)),\
                                        fl.size, filename))