Comment 45 for bug 982210

Revision history for this message
In , Paurick (paurick) wrote :

Created attachment 119395
Invalid date test feed

This is what happens (Akregator 5.10.3):
In Akregator::Feed::appendArticles fetched items are processed. All items are stored in the feed's archive. Only new items which have a publication date newer than the expiration date, will be appended to the feed's article list. The next time the feed is fetched, all items which were processed earlier but were not added to the article list and haven't changed since then, will be processes as new items. That's when the problems start on these two lines:
 Article mya(*it, this);
 mya.offsetPubDate(nudge);

The (private) constructor of Article creates an object with an invalid publication date (the default QDateTime constructor) because the item was already stored in the feed's archive and it hasn't changed. On the next line the publication date is updated, but based on the invalid publication date. This causes the invalid date to be written to the feed's archive.

It's easy to reproduce with the attached feed:
1. Add the feed to Akregator.
2. Fetch the feed.

The article first appears as a blank line, but after restarting Akregator the invalid is shown.