Java – parse string date and time zone Eest EET

Parse the complete date toString(); @ H_ 502_ 7@

private final DateFormat dfFull = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
String str = "Wed Oct 30 13:05:26 EET 2013";
dfFull.parse(str);
java.text.ParseException: Unparseable date: "Wed Oct 30 13:05:26 EET 2013"

Solution

Use EEE MMM DD HH: mm: SS zzz yyyy instead of EEE MMM DD HH: mm: SS Z yyyy

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>