diff --git a/metrik/tasks/ice.py b/metrik/tasks/ice.py index b03e477..ab0fdb8 100644 --- a/metrik/tasks/ice.py +++ b/metrik/tasks/ice.py @@ -1,7 +1,6 @@ from __future__ import print_function import csv -from tzlocal import get_localzone import requests from collections import namedtuple from dateutil.parser import parse @@ -63,9 +62,6 @@ class LiborRateTask(MongoCreateTask): # download with `requests`, I see both date (often incorrect) and time. logging.info('Received string for publication time: {}'.format(row['publication'])) dt = parse(row['publication']) - if dt.tzinfo is None: - tz = get_localzone() - dt = tz.localize(dt) logging.info('Parsed datetime: {}'.format(dt)) logging.info('Parse timezone: {}'.format(dt.tzinfo)) dt = dt.replace(year=date.year, month=date.month, day=date.day) diff --git a/requirements.txt b/requirements.txt index 696a949..7601fdf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ pyquery>=1.2.9 requests>=2.9.1 pandas>=0.17.1 pymongo>=3.2 -tzlocal>=1.2.2 \ No newline at end of file +dateutil>=2.4.2 \ No newline at end of file diff --git a/setup.py b/setup.py index 4bceaad..e7b9507 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( 'six >= 1.10.0', 'pymongo >= 3.2', 'pytz >= 2016.6.1', - 'tzlocal >= 1.2.2' + 'dateutil >= 2.4.2' ], setup_requires=[ 'pytest_runner'