Skip to content

Commit f6861e3

Browse files
committed
Replace fromisoformat with explicit construction of datetime
1 parent 8a00d13 commit f6861e3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

repo_config.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
from os.path import dirname, abspath
55
import os
66

7+
try:
8+
import datetime.timezone.utc as UTC
9+
except ImportError:
10+
class UTC(datetime.tzinfo):
11+
def utcoffset(self, dt):
12+
return datetime.timedelta(0)
13+
def tzname(self, dt):
14+
return "UTC"
15+
def dst(self, dt):
16+
return datetime.timedelta(0)
17+
718
GH_TOKEN = os.getenv("GH_TOKEN_FILE", "~/.github-token")
819
GH_TOKEN_READONLY = "~/.github-token-readonly"
920
CONFIG_DIR = dirname(abspath(__file__))
@@ -16,4 +27,4 @@
1627
IGNORE_ISSUES = {
1728
GH_CMSSW_ORGANIZATION + "/" + GH_CMSSW_REPO: [12368],
1829
}
19-
LEGACY_CATEGORIES = {"upgrade": datetime.datetime.fromisoformat("2025-10-10T00:00:00+00:00")}
30+
LEGACY_CATEGORIES = {"upgrade": datetime.datetime(2025, 10, 10, 0, 0, tzinfo=UTC)}

0 commit comments

Comments
 (0)