Skip to content

Commit

Permalink
Merge pull request #715 from camptocamp/fix-date
Browse files Browse the repository at this point in the history
Fix compare offset-naive and offset-aware datetimes
  • Loading branch information
sbrunner authored Feb 24, 2025
2 parents 8d13f29 + 4792090 commit 8edeb51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions github_app_geo_project/module/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ def manage_updated_separated(
_LOGGER.debug("Set updated %s to %s", key, updated[key])
min_date = datetime.datetime.now(datetime.UTC) - datetime.timedelta(days=days_old)
for other_key, date in list(updated.items()):
date = date.replace(tzinfo=datetime.UTC)
if date < min_date:
_LOGGER.debug(
"Remove old date %s (%s < %s)",
Expand Down

0 comments on commit 8edeb51

Please sign in to comment.