fix error converting tzaware to tzaware

This commit is contained in:
wassname
2018-03-31 09:50:41 +08:00
parent 4c84ea8efc
commit 06399caa2b
+2 -5
View File
@@ -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):