Skip to content

Commit

Permalink
Fix datetime string received from GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoWilken committed Nov 29, 2023
1 parent bc5acf2 commit a0e9008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion list-branch-pr
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def main(args):
# sorting, so default to the empty string if so.
for pull in sorted(prs, key=lambda pr: pr["waiting_since"] or ""):
commit_timestr = pull["waiting_since"]
commit_time = datetime.fromisoformat(commit_timestr) \
commit_time = datetime.fromisoformat(commit_timestr.replace("Z", "+00:00")) \
if commit_timestr else datetime.now(timezone.utc)
print(group, pull["number"], pull["sha"], pull["build_config"],
int(commit_time.timestamp()), sep="\t")
Expand Down

0 comments on commit a0e9008

Please sign in to comment.