Skip to content

Commit

Permalink
fix:: psql daily tz mismatch in range dates
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomiku committed Mar 22, 2021
1 parent 008d298 commit a1cc31c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipline/data/psql_daily_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ def _validate_data_consistency_on_edges(self, sid, data, edge_days, invalid_data
# sessions (sessions on the edge of the data and the slice)
consistent_data = True
if not before_slice.empty:
backward_gap = len(self._calendar.sessions_in_range(before_slice.index[-1], first_day))
backward_gap = len(self._calendar.sessions_in_range(before_slice.index[-1].tz_localize(None), first_day))
if backward_gap != 2:
# max allowed gap for consistent data is 2
logger.warning(f"data for {sid} contains backward gaps {backward_gap} "
Expand Down

0 comments on commit a1cc31c

Please sign in to comment.