4 ms·
Can you please add an item's publish date (<pubDate>) to the RSS feed? It's seriously low-hanging fruit. Just whatever the date in the DB says is fine - there m
by russellbeattie 17y ago
Can you please add an item's publish date (<pubDate>) to the RSS feed? It's seriously low-hanging fruit. Just whatever the date in the DB says is fine - there must be a 'created' timestamp in there somewhere. Format it as RFC822 timestamp:
def _format_date(dt):
"""convert a datetime into an RFC 822 formatted date
Input date must be in GMT.
"""
# Sat, 07 Sep 2002 00:00:01 GMT
return "%s, %02d %s %04d %02d:%02d:%02d GMT" % (
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][dt.weekday()],
dt.day,
["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][dt.month-1],
dt.year, dt.hour, dt.minute, dt.second)
-Russ