I am having a problem parsing a date from an input string, which has the following format:
String input = "Fri Jul 15 12:00:00 GMT+300 2011";
String dateFormat = "EEE MMM d HH:mm:ss z yyyy";
Date date = new SimpleDateFormat(dateFormat).parse(input);
An exception is thrown:
java.text.ParseException: Unparseable date: "Fri Jul 15 12:00:00 GMT+300 2011"
at java.text.DateFormat.parse(DateFormat.java:337)
I am sure this is due to the GMT string. I think I tried it with the z, zzz, zZand zzzZ. Any suggestions? Is the input a GMT+300standard, valid input format?
source
share