From: Filippo Giunchedi Date: Tue, 9 Dec 2008 22:16:30 +0000 (+0100) Subject: use different pubDate if going in or out X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec4b121fc68813f96f59b7a225e0d200c34c98bb;p=dak use different pubDate if going in or out --- 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" % \