mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 01:21:18 +08:00
fix error converting tzaware to tzaware
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user