Browse Source

backports

master
Nils 3 years ago
parent
commit
02debffd4e
  1. 6
      atomfeedgen.py

6
atomfeedgen.py

@ -15,10 +15,10 @@ from feedgen.feed import FeedGenerator
try:
datetime.fromisoformat
fromisoformat = datetime.fromisoformat
except AttributeError:
import backports.datetime_fromisoformat
fromisoformat = backports.datetime_fromisoformat
from backports.datetime_fromisoformat import MonkeyPatch
MonkeyPatch.patch_fromisoformat()
fg = FeedGenerator()
@ -61,7 +61,7 @@ for cl in changelogData.split("\n\n"):
print(firstLine)
date, semVersion = firstLine.split("Version")
semVersion = semVersion.strip()
isodate = fromisoformat(date.strip())
isodate = datetime.fromisoformat(date.strip())
isodate = isodate.replace(tzinfo=ZoneInfo("UTC"))

Loading…
Cancel
Save