From a0e900829ca8151ecd09f02a50040923e0bfed2c Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 29 Nov 2023 16:29:57 +0100 Subject: [PATCH] Fix datetime string received from GitHub --- list-branch-pr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list-branch-pr b/list-branch-pr index 00ebb6aa..2d38ac1f 100755 --- a/list-branch-pr +++ b/list-branch-pr @@ -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")