Print timestamps in human readable format
This commit is contained in:
parent
eb7b9c066c
commit
7072a19829
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import datetime
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from platypush.backend import Backend
|
from platypush.backend import Backend
|
||||||
|
@ -63,7 +64,7 @@ class GoogleFitBackend(Backend):
|
||||||
while not self.should_stop():
|
while not self.should_stop():
|
||||||
new_last_timestamp = last_timestamp
|
new_last_timestamp = last_timestamp
|
||||||
self.logger.info('Scanning fit data source, last seen 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:
|
for data_source in self.data_sources:
|
||||||
data_source_last_timestamp = 0
|
data_source_last_timestamp = 0
|
||||||
|
@ -92,7 +93,7 @@ class GoogleFitBackend(Backend):
|
||||||
|
|
||||||
self.logger.info('Got {} entries from data source {}, last timestamp: {}'.
|
self.logger.info('Got {} entries from data source {}, last timestamp: {}'.
|
||||||
format(len(data_points), data_source,
|
format(len(data_points), data_source,
|
||||||
data_source_last_timestamp))
|
str(datetime.datetime.fromtimestamp(data_source_last_timestamp))))
|
||||||
|
|
||||||
|
|
||||||
last_timestamp = new_last_timestamp
|
last_timestamp = new_last_timestamp
|
||||||
|
|
Loading…
Reference in a new issue