import encodings.ascii
from email.Parser import HeaderParser
from optparse import OptionParser
+from datetime import datetime
import PyRSS2Gen
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
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" % \