null is returned by SyndEntry.getPublishedDate() in case of wrong time format from RSS supplier

Description

I'm using ROME 1.0, Manifest.mf says: Build-Jdk: 1.6.0_10.
The problem is that RSS provider supplies PublishedDate in wrong format (timezone is missing) and ROME returns null on SyndEntry.getPublishedDate();
Maybe it is possible to refine parsing procedure somehow. In worst case scenario maybe return as PublishedDate value from LastBuildDate or else, but not null.
Here is the link with wrong date format:
http://dir.yahoo.com/rss/dir/getrss.php?reg_us

It returns (well, at least, how it looks like in Chrome, and IE8):
<pubDate>WED,23 MAY 2012 02:23:01</pubDate> // no space after week day, time zone is missing
but has to be like:
<pubDate>WED, 23 MAY 2012 02:23:01 GMT</pubDate>

Any comments, ideas?

Environment

Windows7

Activity

Show:

Martin Kurz October 7, 2013 at 3:13 PM

We recently moved to GitHub. The issue is now located here: https://github.com/rometools/rome/issues/166

Hong-Thai Nguyen January 7, 2013 at 4:23 PM

I discovered a solution by reading DateParser.
Put one or some custom date formats in rome.properties: datetime.extra.masks=yyyy-MM-dd'T'HH:mm:ss|other_format

David Fine August 25, 2012 at 9:50 PM
Edited

I also have seen this issue. In an RSS Feed I was trying to parse, I encountered:
<pubDate>Sat, 25 Aug 2012</pubDate>
instead of the correctly formatted:
<pubDate>Sat, 25 Aug 2012 15:39:00 EDT</pubDate>

I would appreciate if better date parsing support was added. If only the date is found, and not the time, I recommend the time be assumed to be midnight so that a proper Date object can be returned instead of null.

Thanks!

Won't Fix

Details

Assignee

Reporter

Labels

Participants

Affects versions

Priority

Created May 25, 2012 at 2:07 AM
Updated October 7, 2013 at 3:25 PM
Resolved October 7, 2013 at 3:25 PM