【发布时间】:2011-02-11 22:18:23
【问题描述】:
如何将 RSS 提要中的 pubDate 解析为 java 中的 Date 对象。
RSS 提要中的格式: 2010 年 4 月 24 日星期六 14:01:00 GMT
我现在拥有的:
DateFormat dateFormat = DateFormat.getInstance();
Date pubDate = dateFormat.parse(item.getPubDate().getText());
但是这段代码会抛出 ParseException 并显示 Unparseable date 消息
【问题讨论】:
标签: java date rss date-format