def time(self): if self.file: return int(os.path.getmtime("merge_data/"+self.file)+.5) elif self.fileUrl: if self.zip: f = downloader.urlopen(self.fileUrl, self.fileUrlCache) date_time = zipfile.ZipFile(f, 'r').getinfo(self.zip).date_time return time.mktime(date_time + (0, 0, -1)) else: return int(downloader.urlmtime(self.fileUrl, self.fileUrlCache)+.5)
def time(self): if self.file: return int(os.path.getmtime(self.file)+.5) elif self.fileUrl: if self.zip: f = downloader.urlopen(self.fileUrl, self.fileUrlCache, mode='rb') date_time = zipfile.ZipFile(f, 'r').getinfo(self.zip).date_time return int(time.mktime(date_time + (0, 0, -1))+.5) else: return int(downloader.urlmtime(self.fileUrl, self.fileUrlCache)+.5)