diff --git a/repomirror/fetcher/_base.py b/repomirror/fetcher/_base.py index c4094a1..7f8ac65 100644 --- a/repomirror/fetcher/_base.py +++ b/repomirror/fetcher/_base.py @@ -27,7 +27,7 @@ class BaseFetcher(object): if v: tstmp_raw = self.fetch_content(v.path).decode('utf-8').strip() if '%s' in v.fmt: - tstmp = datetime.datetime.fromtimestamp(int(tstmp_raw)) + tstmp = datetime.datetime.fromtimestamp(float(tstmp_raw)) else: tstmp = datetime.datetime.strptime(tstmp_raw, v.fmt) self.timestamps[k] = tstmp diff --git a/repomirror/sync.py b/repomirror/sync.py index daf7cf0..4da4286 100644 --- a/repomirror/sync.py +++ b/repomirror/sync.py @@ -111,7 +111,7 @@ class TimestampFile(object): with open(path, 'r') as fh: ts_raw = fh.read().strip() if '%s' in self.fmt: - timestamp = datetime.datetime.fromtimestamp(int(ts_raw)) + timestamp = datetime.datetime.fromtimestamp(float(ts_raw)) else: timestamp = datetime.datetime.strptime(ts_raw, self.fmt) _logger.debug('Read timestamp {0} from {1}'.format(str(timestamp), self.path))