Donate Share

SimpleRSS

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

about Date parse bug

You are viewing a single message from this topic. View all messages.

  1. 2007-06-19 07:21:17 UTC
    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
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.