+ global items
+ # Sort items by pubDate, which still holds the mtime
+ items.sort(key=lambda i: i.pubDate, reverse=True)
+
+ # Limit to requested number
+ count = int(cfg.rss_max_items)
+ if count:
+ items = items[:count]
+
+ # convert mtime to real pupDate
+ for i in items:
+ i.pubDate = datetime.datetime.fromtimestamp(i.pubDate, utc)
+