Skip to content

Commit

Permalink
timed: diff against absolute value of timedelta (#34299)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored Dec 20, 2024
1 parent 7ac011c commit 484b96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/timed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def set_time(new_time):
diff = datetime.datetime.now() - new_time
if diff < datetime.timedelta(seconds=10):
if abs(diff) < datetime.timedelta(seconds=10):
cloudlog.debug(f"Time diff too small: {diff}")
return

Expand Down

0 comments on commit 484b96f

Please sign in to comment.