fix atom update datetime

This commit is contained in:
Jaume Delclòs Coll 2020-10-29 16:47:15 +01:00
parent d337e65f97
commit 19a3eb0297
1 changed files with 1 additions and 3 deletions

View File

@ -66,9 +66,7 @@ def publish_atom(entry_filenames, settings):
fe.author(name=config.USER)
fe.content(html, type="html")
try: # crashing because of an invalid date would be sad
year, month, day = [int(x) for x in date]
dt = datetime.datetime(year, month, day)
fe.updated(dt)
fe.updated("-".join(date)+"T00:00:00Z")
except ValueError:
pass
outfile = os.path.join(config.WWW, 'atom.xml')