Merge pull request #1178 from SkynetLabs/round-full-hours

round reporting datetime to full hours
This commit is contained in:
Matthew Sevey 2021-09-10 14:25:30 -04:00 committed by GitHub
commit b75c0c2c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -160,7 +160,9 @@ async def check_health():
failed_records = [] failed_records = []
failed_records_file = None 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: for critical in json_critical:
time = datetime.strptime(critical["date"], "%Y-%m-%dT%H:%M:%S.%fZ") time = datetime.strptime(critical["date"], "%Y-%m-%dT%H:%M:%S.%fZ")