mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-26 13:18:31 +08:00
MAINT: Use enviroment normalize_date instead of dt.replace
Continue path of removing scattered calls to dt.replace.
This commit is contained in:
@@ -271,7 +271,7 @@ class BatchTransform(object):
|
||||
_, mkt_close = trading.environment.get_open_and_close(event.dt)
|
||||
if self.bars == 'daily':
|
||||
# Daily bars have their dt set to midnight.
|
||||
mkt_close = mkt_close.replace(hour=0, minute=0, second=0)
|
||||
mkt_close = trading.environment.normalize_date(mkt_close)
|
||||
if event.dt >= mkt_close:
|
||||
if self.downsample:
|
||||
downsample_panel(self.rolling_panel,
|
||||
|
||||
Reference in New Issue
Block a user