Skip to content

Commit 38cc72f

Browse files
author
Dominik Neise
authored
Merge branch 'master' into fix_status
2 parents 3afd5e1 + 09b0caf commit 38cc72f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='smart_fact_crawler',
12-
version='0.6.5',
12+
version='0.7.0',
1313
description='acquire data published on the smartfact web page',
1414
url='https://github.com/fact-project/smart_fact_crawler.git',
1515
author='Dominik Neise, Sebastian Mueller, Maximilian Nöthe',

smart_fact_crawler/tools.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import html
22
import requests
33
import urllib
4-
from datetime import datetime
4+
from datetime import datetime, timezone
5+
6+
7+
UTC = timezone.utc
58

69

710
def str2float(text):
@@ -17,8 +20,9 @@ def smartfact_time2datetime(fact_timestamp):
1720
if fact_timestamp is None:
1821
return None
1922

20-
return datetime.utcfromtimestamp(
21-
str2float(fact_timestamp) / 1000.0
23+
return datetime.fromtimestamp(
24+
str2float(fact_timestamp) / 1000.0,
25+
tz=UTC,
2226
)
2327

2428

0 commit comments

Comments
 (0)