about Date parse bug

Help
cuiyehong
2007-06-19
2013-04-08
  • cuiyehong
    cuiyehong
    2007-06-19

    Hi guys I got a "null" at "pubDate" while I was pull the Reuters forex news,
    http://feeds.reuters.com/reuters/CNcurrencies/

    seems it could not parse Date, I check the source and found a tiny bug,
    here is my solution ;)

    com.simplerss.handler.ItemHandler
    from line 95:
            else if ("pubdate".equals(tag))
            {
                Calendar cld = new GregorianCalendar();
                try {
                    cld.setTime(new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss",
                                   Locale.US).parse(mText));
                } catch (ParseException e) {
                    //swallow
                }
               
                item.setPubDate(cld);
            }

    Regards
    Cui