From ceff0053690994a12fa428419be5ed81b7d4f4d8 Mon Sep 17 00:00:00 2001 From: Zack Koppert Date: Mon, 1 Apr 2024 17:23:38 -0700 Subject: [PATCH] fix: remove time of day and tz info properly Signed-off-by: Zack Koppert --- evergreen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evergreen.py b/evergreen.py index 51513ac..6f25542 100644 --- a/evergreen.py +++ b/evergreen.py @@ -80,7 +80,10 @@ def main(): # pragma: no cover except github3.exceptions.NotFoundError: pass - if created_after_date and repo.created_at.replace( + repo_createdat_date_object = datetime.strptime( + repo.created_at.split("T")[0], "%Y-%m-%d" + ) + if created_after_date and repo_createdat_date_object.replace( tzinfo=None ) < datetime.strptime(created_after_date, "%Y-%m-%d"): continue