在查看了几个现有帖子之后,我仍然无法使我的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);
}
Run Code Online (Sandbox Code Playgroud)
我总是以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
区域设置已设置,模式看起来没问题.我哪里错了?