Skip to content

Commit

Permalink
Merge pull request #12583 from Mab879/fix_tz_compare
Browse files Browse the repository at this point in the history
Fix comparing timezone and non-timezone timestamps
  • Loading branch information
marcusburghardt authored Nov 7, 2024
2 parents e9720ad + b246b3f commit 6bca498
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/release_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# - https://pygithub.readthedocs.io/en/latest/github_objects.html
# - https://docs.github.com/en/rest

from datetime import datetime, timedelta
from datetime import datetime, timedelta, UTC

from github import Github
import argparse
import configparser
Expand Down Expand Up @@ -362,7 +363,7 @@ def get_next_stabilization_date(release_date) -> datetime:

def get_next_release_date(latest_release_date: datetime) -> datetime:
month = get_next_quarter_first_month(latest_release_date)
now = datetime.now()
now = datetime.now(UTC)

if month > 9 and latest_release_date <= now:
year = latest_release_date.year + 1
Expand Down

0 comments on commit 6bca498

Please sign in to comment.