mirror of
https://github.com/bspeice/metrik
synced 2024-11-23 15:48:10 -05:00
Make sure dateutil up to date?
This commit is contained in:
parent
dc3c57445b
commit
f1d2ec524c
@ -1,7 +1,6 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
from tzlocal import get_localzone
|
|
||||||
import requests
|
import requests
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from dateutil.parser import parse
|
from dateutil.parser import parse
|
||||||
@ -63,9 +62,6 @@ class LiborRateTask(MongoCreateTask):
|
|||||||
# download with `requests`, I see both date (often incorrect) and time.
|
# download with `requests`, I see both date (often incorrect) and time.
|
||||||
logging.info('Received string for publication time: {}'.format(row['publication']))
|
logging.info('Received string for publication time: {}'.format(row['publication']))
|
||||||
dt = parse(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('Parsed datetime: {}'.format(dt))
|
||||||
logging.info('Parse timezone: {}'.format(dt.tzinfo))
|
logging.info('Parse timezone: {}'.format(dt.tzinfo))
|
||||||
dt = dt.replace(year=date.year, month=date.month, day=date.day)
|
dt = dt.replace(year=date.year, month=date.month, day=date.day)
|
||||||
|
@ -4,4 +4,4 @@ pyquery>=1.2.9
|
|||||||
requests>=2.9.1
|
requests>=2.9.1
|
||||||
pandas>=0.17.1
|
pandas>=0.17.1
|
||||||
pymongo>=3.2
|
pymongo>=3.2
|
||||||
tzlocal>=1.2.2
|
dateutil>=2.4.2
|
Loading…
Reference in New Issue
Block a user