From 7dd9881943d5edfe58d3f0c078d2bd3f14ed5e0f Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sat, 23 Dec 2023 10:05:24 +0000 Subject: [PATCH] No need for pytz --- build.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 0bf02b2..a4f0ad3 100755 --- a/build.py +++ b/build.py @@ -7,10 +7,8 @@ import json import os import sys import typing -from collections import Counter -from datetime import date, datetime, timedelta +from datetime import datetime, timezone -import pytz import requests config = configparser.ConfigParser() @@ -70,7 +68,7 @@ def parse_date(date_str: str | None) -> datetime | None: return None fmt = "%Y-%m-%dT%H:%M:%SZ" if date_str.endswith("Z") else "%Y-%m-%dT%H:%M:%S%z" - return datetime.strptime(date_str, fmt).astimezone(pytz.utc) + return datetime.strptime(date_str, fmt).astimezone(timezone.utc) def count_open_bugs(bug_reports: list[Bug]) -> list[tuple[str, int]]: