mirror of https://github.com/tildeclub/ttbp.git
fix atom update datetime
This commit is contained in:
parent
d337e65f97
commit
19a3eb0297
|
@ -66,9 +66,7 @@ def publish_atom(entry_filenames, settings):
|
||||||
fe.author(name=config.USER)
|
fe.author(name=config.USER)
|
||||||
fe.content(html, type="html")
|
fe.content(html, type="html")
|
||||||
try: # crashing because of an invalid date would be sad
|
try: # crashing because of an invalid date would be sad
|
||||||
year, month, day = [int(x) for x in date]
|
fe.updated("-".join(date)+"T00:00:00Z")
|
||||||
dt = datetime.datetime(year, month, day)
|
|
||||||
fe.updated(dt)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
outfile = os.path.join(config.WWW, 'atom.xml')
|
outfile = os.path.join(config.WWW, 'atom.xml')
|
||||||
|
|
Loading…
Reference in New Issue