Print timestamps in human readable format

This commit is contained in:
Fabio Manganiello 2019-03-19 11:32:06 +00:00
parent eb7b9c066c
commit 7072a19829
1 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import datetime
import time
from platypush.backend import Backend
@ -63,7 +64,7 @@ class GoogleFitBackend(Backend):
while not self.should_stop():
new_last_timestamp = last_timestamp
self.logger.info('Scanning fit data source, last seen timestamp: {}'.
format(last_timestamp))
format(str(datetime.datetime.fromtimestamp(last_timestamp))))
for data_source in self.data_sources:
data_source_last_timestamp = 0
@ -92,7 +93,7 @@ class GoogleFitBackend(Backend):
self.logger.info('Got {} entries from data source {}, last timestamp: {}'.
format(len(data_points), data_source,
data_source_last_timestamp))
str(datetime.datetime.fromtimestamp(data_source_last_timestamp))))
last_timestamp = new_last_timestamp