mirror of
https://github.com/bspeice/metrik
synced 2024-11-23 15:48:10 -05:00
Correct for DST as well
This commit is contained in:
parent
c4f0655322
commit
136aa6775e
@ -68,10 +68,10 @@ class LiborRateTask(MongoCreateTask):
|
|||||||
# I'd be interested to know if it's an IP based thing, but the
|
# I'd be interested to know if it's an IP based thing, but the
|
||||||
# Travis settings resolve the `local` timezone to UTC so just
|
# Travis settings resolve the `local` timezone to UTC so just
|
||||||
# manually set New York here to work around that.
|
# manually set New York here to work around that.
|
||||||
|
logging.warning('Correcting parsed ICE time to America/New_York')
|
||||||
tz = pytz.timezone('America/New_York')
|
tz = pytz.timezone('America/New_York')
|
||||||
dt = tz.localize(dt)
|
dt = tz.localize(dt, is_dst=('EST' in row['publication']))
|
||||||
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)
|
dt = dt.replace(year=date.year, month=date.month, day=date.day)
|
||||||
globals()['publication'] = dt
|
globals()['publication'] = dt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user