Skip to content

Commit 61c919d

Browse files
committed
Ensure that date of inclusion if offset-aware.
This patch (should) fixes #434. Contributor: @DandelionSprout
1 parent 2f244c1 commit 61c919d

File tree

1 file changed

+4
-0
lines changed
  • PyFunceble/dataset/inactive

1 file changed

+4
-0
lines changed

PyFunceble/dataset/inactive/csv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ def get_to_retest(
9292
else:
9393
date_of_inclusion = dataset["tested_at"]
9494

95+
if date_of_inclusion.tzinfo is None: # pragma: no cover
96+
# Ensure that timezone is set.
97+
date_of_inclusion = date_of_inclusion.replace(tzinfo=timezone.utc)
98+
9599
if date_of_inclusion > days_ago:
96100
continue
97101

0 commit comments

Comments
 (0)