Skip to content

Commit

Permalink
Merge branch 'master' into fix_status
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Neise authored Apr 27, 2021
2 parents 3afd5e1 + 09b0caf commit 38cc72f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='smart_fact_crawler',
version='0.6.5',
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',
Expand Down
10 changes: 7 additions & 3 deletions smart_fact_crawler/tools.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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,
)


Expand Down

0 comments on commit 38cc72f

Please sign in to comment.