无法解析日期
我正在尝试解析证书中的日期以验证其有效性,并显示此错误:
Unparseable date: "Mon Dec 05 09:47:18 CST 2011"
我当前使用的 SimpleFormat 是:
Date date = new SimpleDateFormat("EEE mmm dd HH:mm:ss z yyyy").parse(inputDate);
I'm trying to parse the date from a certificate to verify its validity and this error is shown:
Unparseable date: "Mon Dec 05 09:47:18 CST 2011"
The SimpleFormat I'm currently using is:
Date date = new SimpleDateFormat("EEE mmm dd HH:mm:ss z yyyy").parse(inputDate);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
MMM
而不是mmm
作为月份名称部分。还要检查您正在使用的区域设置,因为显然不同的区域设置有不同的月份和日期名称。Try using
MMM
instead ofmmm
for the month name part. Also check which locale you're using, as obviously different locales have different month and day names.