From ec4b121fc68813f96f59b7a225e0d200c34c98bb Mon Sep 17 00:00:00 2001 From: Filippo Giunchedi Date: Tue, 9 Dec 2008 23:16:30 +0100 Subject: [PATCH] use different pubDate if going in or out --- queue_rss.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/queue_rss.py b/queue_rss.py index c312b25b..c99bd6cc 100755 --- a/queue_rss.py +++ b/queue_rss.py @@ -12,6 +12,7 @@ import sys import encodings.ascii from email.Parser import HeaderParser from optparse import OptionParser +from datetime import datetime import PyRSS2Gen @@ -101,9 +102,11 @@ def add_rss_item(status, msg, direction): if direction == "in": feed = status.feed_in title = "%s %s entered NEW" % (msg['Source'], msg['Version']) + pubdate = msg['Date'] elif direction == "out": feed = status.feed_out title = "%s %s left NEW" % (msg['Source'], msg['Version']) + pubdate = datetime.utcnow() else: return False @@ -113,8 +116,7 @@ def add_rss_item(status, msg, direction): feed.items.insert(0, PyRSS2Gen.RSSItem( title, - pubDate = msg['Date'], -# pubDate = now(), + pubDate = pubdate, description = description, author = utf2ascii(msg['Maintainer']), link = "http://ftp-master.debian.org/new/%s_%s.html" % \ -- 2.39.5