whoops, small bug

This commit is contained in:
brent s. 2020-06-17 01:10:09 -04:00
parent 0b2b74888f
commit 9f39d0562d
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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))