@@ 126,7 126,7 @@ Content-Type: text/plain
oldtime = None
if oldtime and not oldtime.tzinfo: # force UTC
oldtime = oldtime.replace(tzinfo=dateutil.tz.tzutc())
- # print(feedname, feedup.tzinfo)
+
if not oldtime or oldtime < feedup:
for post in feed.entries:
feedtime = self.post_update_time(post)
@@ 143,7 143,11 @@ Content-Type: text/plain
post.link))
new.setdefault(feedname, []).append(post)
- newtimes[feedname] = feedup.strftime('%Y-%m-%d %H:%M:%S %Z')
+ if oldtime is not None:
+ newtimes[feedname] = max(oldtime, feedup).strftime('%Y-%m-%d %H:%M:%S %Z')
+ else:
+ newtimes[feedname] = feedup.strftime('%Y-%m-%d %H:%M:%S %Z')
+
self.output('Feedname : {} : Feedup : {}'.format(feedname, newtimes[feedname]))
return (new, newtimes)