From 2067f0f691b04ddb9c5da4c5a0ae80a9dce3729f Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 13 Apr 2024 22:30:52 -0600 Subject: begin move to atom --- generate_me.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'generate_me.py') diff --git a/generate_me.py b/generate_me.py index 736cece..1c61f06 100644 --- a/generate_me.py +++ b/generate_me.py @@ -256,17 +256,21 @@ for fpath in index_pages_to_generate: for post in post_collection_html: post.metadata["link"] = "https://web.navan.dev" + post.metadata["link"] - post.metadata["date"] = email.utils.format_datetime( - datetime.datetime.strptime(post.metadata["date"], "%Y-%m-%d %H:%M") - ) + #post.metadata["date"] = email.utils.format_datetime( + # datetime.datetime.strptime(post.metadata["date"], "%Y-%m-%d %H:%M") + #) + + # datetime in RFC 3339 format + post.metadata["date"] = datetime.datetime.strptime(post.metadata["date"], "%Y-%m-%d %H:%M").isoformat() +rfc_3389 = datetime.datetime.now().isoformat() with open(os.path.join(out_folder, "feed.rss"), "w") as f: f.write( templates.get_template("feed.rss").render( feed={ "title": f_title, - "date": f_date, + "date": rfc_3389, "description": f_description, "link": base_link, }, -- cgit v1.2.3