Inconsistent use of time zones
rdong8 opened this issue · 3 comments
rdong8 commented
For instance, for the CME energy and metals class, we have no time zone supplied here:
But it is used here:
rsheftel commented
Agree that this should be cleaned up for visual consistency. As a practical matter there is a .tz method on every calendar that defines the default time zone. If you would like to submit a PR that would be great.
rdong8 commented
tz must be defined before we refer to it, so is it ok to move all the definitions of the tz property right above the definition of regular_market_times?
class CMEGlobexEquitiesExchangeCalendar(CMEGlobexBaseExchangeCalendar):
aliases = ["CME Globex Equity"]
@property
def tz(self): return timezone("America/Chicago")
regular_market_times = {
"market_open": ((None, time(17), -1),), # offset by -1 day
"market_close": ((None, time(16)),),
}
rsheftel commented
Yes