Bug 209303 - pubDate field ignored by akregator
Summary: pubDate field ignored by akregator
Status: RESOLVED WORKSFORME
Alias: None
Product: akregator
Classification: Applications
Component: feed parser (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-03 14:43 UTC by Elmar Stellnberger (AT/K)
Modified: 2010-02-06 21:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Stellnberger (AT/K) 2009-10-03 14:43:39 UTC
Version:           1.5.1 (using 4.3.1 (KDE 4.3.1) "release 3", openSUSE Factory)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.31-rc9-7-default

No matter how I specify the pubdate Akregator shows me a wrong date for my message items:

I would suppose the following date strings to work:
a.) old format:
      <pubDate>2009-09-09T09:09:09-05:00</pubDate>
      <pubDate>2009-09-09T09:09:09</pubDate>
      <pubDate>2009-09-09</pubDate>

b.) new format (see  RFC-822 date-time):
<pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>
<pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>
Comment 1 Elmar Stellnberger (AT/K) 2009-10-03 14:46:11 UTC
I would personally welcome the standard unix date specification to be accepted as well: 2009-09-09 09:09:09.
Comment 2 Frank Osterfeld 2009-10-03 16:12:47 UTC
You are talking about RSS 2.0, I guess?
The "spec" ( http://cyber.law.harvard.edu/rss/rss.html ) specifies the pubDate as RFC 822. Which is what is usually used in practice, from what I can tell. ISO should also work, as fallback. I won't add support for more random notations unless there is significant real world usage.

What is the "wrong date" Akregator shows you for your above RFC 822 example? 
Does it affect all feeds?
It would be useful if you could provide your feed xml file for reproducing the issue.

The parser works, on my box, the date parser tests still passing. The parser itself wasn't touched in a long time, date parsing relies on kdelibs (which might in turn use Qt for it, not sure atm) though, so regressions there are not impossible. Or it's a layer up in Akregator itself.
Comment 3 Elmar Stellnberger (AT/K) 2009-10-07 12:15:17 UTC
A test-rss can be found at http://mirror.elstel.com/elstel.rss.
It uses RSS 1.0 date specifications (supposed to work).
Comment 4 Frank Osterfeld 2009-10-11 10:45:37 UTC
Your feed is RSS 2.0, which is completely different from RSS 1.0. In fact, it's not even a successor to 1.0 as one might think (don't get me started on the various RSS/Atom formats). RSS 1.0 uses dc:date which uses the ISO date format, and RSS 2.0 uses RFC 822.
I'd suggest to use RFC 822, which is what's normally used with RSS 2.0. Other formats might work for some readers, but won't for others. I checked Vienna (www.vienna-rss.org), and it doesn't parse the dates from your feed either. But you said RFC 822 didn't work for you either? Would be good to have your test feed for RFC 822, too.
Comment 5 Elmar Stellnberger (AT/K) 2009-10-12 15:13:24 UTC
  Have now switched the date specification of the feed to RSS 2.0 for the case that other rss-readers should have problems with RSS 1.0-dates as well (Thunderbird interpretes them correctly).
  For testing purposes I have kept you the old rss online as http://mirror.elstel.com/elstel.1.0.rss.
  If you should forward to supporting other RSS 2.0-tags I have added an URL-field to the <source>-tag as specified in the standard for http://mirror.elstel.com/elstel.2.0.rss, so that future users will be able to add referring channels directly fromout of akregator (http://mirror.elstel.com/elstel-checkroot.2.0.rss).
  It would be really groovy if akregator once supported all these tags including an ico for each channel (image-tag)!