From 5ba4f54302cdfb4aaf0eb724e13b1fad6b0b11cb Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 10 Sep 2021 13:24:19 +0200 Subject: [PATCH] round reporting datetime to full hours --- setup-scripts/health-checker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup-scripts/health-checker.py b/setup-scripts/health-checker.py index 42df82ef..53af5984 100755 --- a/setup-scripts/health-checker.py +++ b/setup-scripts/health-checker.py @@ -160,7 +160,9 @@ async def check_health(): failed_records = [] failed_records_file = None - time_limit = datetime.utcnow() - timedelta(hours=CHECK_HOURS) + time_limit = datetime.utcnow().replace( + minute=0, second=0, microsecond=0 + ) - timedelta(hours=CHECK_HOURS) for critical in json_critical: time = datetime.strptime(critical["date"], "%Y-%m-%dT%H:%M:%S.%fZ")