From 7072a1982983d122d2e797497981e7d186955937 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 19 Mar 2019 11:32:06 +0000 Subject: [PATCH] Print timestamps in human readable format --- platypush/backend/google/fit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platypush/backend/google/fit.py b/platypush/backend/google/fit.py index cebfaea3e4..7f8cbd52df 100644 --- a/platypush/backend/google/fit.py +++ b/platypush/backend/google/fit.py @@ -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