diff --git a/netkan/netkan/ticket_closer.py b/netkan/netkan/ticket_closer.py index a140b62..0b5ec84 100644 --- a/netkan/netkan/ticket_closer.py +++ b/netkan/netkan/ticket_closer.py @@ -1,5 +1,5 @@ import logging -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone from importlib.resources import read_text from collections import defaultdict from string import Template @@ -18,7 +18,7 @@ def __init__(self, token: str, user_name: str) -> None: self._user_name = user_name def close_tickets(self, days_limit: int = 7) -> None: - date_cutoff = datetime.now() - timedelta(days=days_limit) + date_cutoff = datetime.now(timezone.utc) - timedelta(days=days_limit) for repo_name in self.REPO_NAMES: repo = self._gh.get_repo(f'{self._user_name}/{repo_name}')