Use datetime object as datetime object instead of string

This commit is contained in:
pvtejas 2026-10-30 18:08:08 +05:30
parent 0843d180e0
commit abc6d04a0a

View file

@ -59,7 +59,7 @@ def generate_feed(db):
item_children = { item_children = {
"description": post_find_first_plain_line(post[4]), "description": post_find_first_plain_line(post[4]),
"guid": f"https://blog.allsparkinfinite.name/{post[0]}/", "guid": f"https://blog.allsparkinfinite.name/{post[0]}/",
"pubDate": datetime.strptime(post[2], "%Y-%m-%d %T").strftime("%a, %d %b %Y %T GMT"), "pubDate": post[2].strftime("%a, %d %b %Y %T GMT"),
"title": post[3], "title": post[3],
"content:encoded": markdown(post[4]), "content:encoded": markdown(post[4]),
} }