Skip to content

Commit

Permalink
fix datetime comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
lschilders committed Jan 13, 2025
1 parent a8aa6d2 commit 75c5788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openstef/validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def detect_ongoing_zero_flatliner(
"""
# remove all timestamps in the future
load = load[load.index.tz_localize(None) <= datetime.now(tz=UTC)]
load = load[load.index <= datetime.now(tz=UTC)]
latest_measurement_time = load.dropna().index.max()
latest_measurements = load[
latest_measurement_time - timedelta(minutes=duration_threshold_minutes) :
Expand Down

0 comments on commit 75c5788

Please sign in to comment.