BUG: Fix bad dates from test factory.

Passing the exchange time timestamp to is_market_hours was ending
up with odd behavior due to conversion back to UTC when checking
the is_trading_day boolean.
This commit is contained in:
Eddie Hebert
2013-11-12 12:45:05 -05:00
parent 20e0ad191b
commit 102cfcbe5b
+1 -1
View File
@@ -139,7 +139,7 @@ def get_next_trading_dt(current, interval):
next_dt = next_dt + interval
next_dt = pd.Timestamp(next_dt, tz=trading.environment.exchange_tz)
next_dt_utc = next_dt.tz_convert('UTC')
if trading.environment.is_market_hours(next_dt):
if trading.environment.is_market_hours(next_dt_utc):
break
next_dt = next_dt_utc.tz_convert(trading.environment.exchange_tz)