From 6b26f82c2dfa2f98917aad94439b9cb4d769b46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Fri, 8 Nov 2019 10:25:28 +0100 Subject: [PATCH 1/2] use utc timezone --- smart_fact_crawler/tools.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/smart_fact_crawler/tools.py b/smart_fact_crawler/tools.py index 91a5a8d..b0f2465 100644 --- a/smart_fact_crawler/tools.py +++ b/smart_fact_crawler/tools.py @@ -1,7 +1,10 @@ import html import requests import urllib -from datetime import datetime +from datetime import datetime, timezone + + +UTC = timezone.utc def str2float(text): @@ -17,8 +20,9 @@ def smartfact_time2datetime(fact_timestamp): if fact_timestamp is None: return None - return datetime.utcfromtimestamp( - str2float(fact_timestamp) / 1000.0 + return datetime.fromtimestamp( + str2float(fact_timestamp) / 1000.0, + tz=UTC, ) From bf015708ca599230b8d68b1fa5b495f95e748bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Fri, 8 Nov 2019 10:25:52 +0100 Subject: [PATCH 2/2] Use timezone utc for timestamp --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e01ce2f..701dbeb 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='smart_fact_crawler', - version='0.6.4', + version='0.7.0', description='acquire data published on the smartfact web page', url='https://github.com/fact-project/smart_fact_crawler.git', author='Dominik Neise, Sebastian Mueller, Maximilian Nöthe',