diff --git a/basant/build/kitaab.py b/basant/build/kitaab.py index 029711c..3bb2753 100644 --- a/basant/build/kitaab.py +++ b/basant/build/kitaab.py @@ -8,7 +8,7 @@ import random import platform import re import shutil -from datetime import datetime +from datetime import datetime, timezone, timedelta, tzinfo # Default encoding encoding = 'utf-8' @@ -541,8 +541,10 @@ def create_rss_feed(rss_entries, rss_template, rss_item_template, site_folder): 'rssItemTitle', rss_entry["title"]) entry_template = entry_template.replace('rssItemUrl', build_url + rss_entry["slug"]) + date = datetime.strptime(rss_entry["iso_date"], "%y%m%d-%H%M") + date = date.strftime("%a, %d %b %Y %H:%M") entry_template = entry_template.replace( - 'rssItemDate', rss_entry["iso_date"]) + 'rssItemDate', date) entry_template = entry_template.replace( 'rssItemContent', rss_entry["pageContent"]) rss_items += entry_template