From 058cfc934264fa4c265498fb721447d70219b80c Mon Sep 17 00:00:00 2001 From: Mario Baranzini Date: Tue, 5 Jul 2022 14:47:43 +0200 Subject: [PATCH] Consider 00:00:00 as 23:59:59 when guessing count (#260) Closes #250 --- comptages/core/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comptages/core/importer.py b/comptages/core/importer.py index d692d632..08f5e188 100644 --- a/comptages/core/importer.py +++ b/comptages/core/importer.py @@ -418,7 +418,7 @@ def guess_count(file_path): id_installation__active=True, id_class__name=header['CLASS'], start_service_date__lte=header['STARTREC'], - end_service_date__gte=header['STOPREC'], + end_service_date__gte=header['STOPREC'] - timedelta(seconds=1), # To manage datetimes like 01.01.2022 00.00 that should be equal to 31.12.2021 ) if len(result) > 0: