From fa5ae1d9179268501c03afeb80b3e6e061652ba4 Mon Sep 17 00:00:00 2001 From: Thomas Baruchel Date: Sat, 5 Nov 2022 15:42:35 +0100 Subject: [PATCH] Fixed stuff --- atom/blog.xml | 2 +- rst2atom.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/blog.xml b/atom/blog.xml index 1718d5d..dc9fe63 100644 --- a/atom/blog.xml +++ b/atom/blog.xml @@ -8,7 +8,7 @@ baruchel@sdf.org CC BY-SA 4.0 - 2022-11-05T14:38:33+00:00Z + 2022-11-05T14:42:25.792793+00:00Z rst2atom diff --git a/rst2atom.py b/rst2atom.py index b8711cc..b0f35a1 100644 --- a/rst2atom.py +++ b/rst2atom.py @@ -60,7 +60,7 @@ def find_date(d): for k in c.extract().split(" "): try: t = dateutil.parser.parse(k) - return t.isoformat(timespec='seconds') + "Z" + return t.isoformat() + "Z" except dateutil.parser.ParserError: pass raise dateutil.parser.ParserError @@ -118,7 +118,7 @@ print(""" docinfos["Author:"], docinfos["Contact:"], meta["copyright"], - datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='seconds') + "Z", + datetime.datetime.now(datetime.timezone.utc).isoformat() + "Z", meta["original-source"], meta["syndication-source"], generator_uri, generator_name