matshofman / Android-RSS-Reader-Library

A RSS reader library to fetch a RSS feed from the web and parse it to workable objects
303 stars 95 forks source link

Unparseable date #1

Closed xentan closed 12 years ago

xentan commented 12 years ago

I got unparseable date when i tried this. I traced it to line 98 in RssItem.java (setPubDate). This is because no locale is set so it defaults to the systems default, in my case, Swedish. Since almost all dates in rss feeds (It should be the RSS reader that converts to your current Locale), are in English (days, month etc). I get an unparseable date exception. This is fixed by modifying the line as follows:

SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);

matshofman commented 12 years ago

Thanks for bringing up this problem! I applied the fix.