From 484b96f2b614990e29b682d498504dbf513a7d09 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 20 Dec 2024 15:28:52 -0800 Subject: [PATCH] timed: diff against absolute value of timedelta (#34299) --- system/timed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/timed.py b/system/timed.py index 3eb84353ad6f2c..de9b0ffb598386 100755 --- a/system/timed.py +++ b/system/timed.py @@ -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