在查看了几个现有的帖子后,我仍然无法让我的 SimpleDateFormat 解析器工作。这是代码:
SimpleDateFormat df = new SimpleDateFormat(
"EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
try {
volcanoListDate = df.parse(currentValue);
} catch (ParseException e) {
Log.d("DEBUG", e.toString());
Log.d("DEBUG", currentValue);
}
我总是以 ParseException 告终。这是调试消息的输出:
06-09 23:52:17.478: DEBUG/DEBUG(2436): java.text.ParseException: Unparseable date: 06-09
23:52:17.478: DEBUG/DEBUG(2436): Wed, 08 Jun 2011 03:23: 55 -0500
区域设置和模式看起来不错。我哪里错了?