Skip to content

Commit

Permalink
Fix another place with offset-aware datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Nov 15, 2023
1 parent ad3f422 commit 30c6cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ci/merge_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def is_approved(self, team: List[NamedUser]) -> bool:
logging.info("The PR is changed at %s", last_changed.isoformat())

approved_at = max(review.submitted_at for review in approved.values())
if approved_at == datetime.fromtimestamp(0):
if approved_at.timestamp() == 0:
logging.info(
"Unable to get `datetime.fromtimestamp(0)`, "
"here's debug info about reviews: %s",
Expand All @@ -138,7 +138,7 @@ def is_approved(self, team: List[NamedUser]) -> bool:
else:
logging.info("The PR is approved at %s", approved_at.isoformat())

if approved_at < last_changed:
if approved_at.timestamp() < last_changed.timestamp():
logging.info(
"There are changes done at %s after approval at %s",
last_changed.isoformat(),
Expand Down

0 comments on commit 30c6cea

Please sign in to comment.