From 06399caa2b51f041f0232b16ee0efa6340d264cd Mon Sep 17 00:00:00 2001 From: wassname Date: Sat, 31 Mar 2018 09:50:41 +0800 Subject: [PATCH] fix error converting tzaware to tzaware --- catalyst/utils/calendars/trading_calendar.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/catalyst/utils/calendars/trading_calendar.py b/catalyst/utils/calendars/trading_calendar.py index 4748b1c2..a6885fd0 100644 --- a/catalyst/utils/calendars/trading_calendar.py +++ b/catalyst/utils/calendars/trading_calendar.py @@ -640,12 +640,9 @@ class TradingCalendar(with_metaclass(ABCMeta)): """ sched = self.schedule - # `market_open` and `market_close` should be timezone aware, but pandas - # 0.16.1 does not appear to support this: - # http://pandas.pydata.org/pandas-docs/stable/whatsnew.html#datetime-with-tz # noqa return ( - sched.at[session_label, 'market_open'].tz_localize('UTC'), - sched.at[session_label, 'market_close'].tz_localize('UTC'), + sched.at[session_label, 'market_open'], + sched.at[session_label, 'market_close'], ) def session_open(self, session_label):