I have a weird problem, when I try to parse this date: Tue Nov 03 10:50:16 CET 2015
using the java SimpleDateFormat, it throws an exception because of the "Tue" in there.
My code is:
String date = "Tue Nov 03 10:50:16 CET 2015";
Date parsedDate = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy").parse(date);
Which throws this exception: java.text.ParseException: Unparseable date: "Tue Nov 03 10:50:16 CET 2015"
I have tried debugging it, and this is what is boils down to:
String date = "Tue";
Date parsedDate = new SimpleDateFormat("EEE").parse(date);
Which throws the same type of exception. (I also tried it with a single 'E'). I think this is really strange, because the documentation tells me that this is how it should be used. Source: https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
Solutions are more than welcome!
Thanks, Luca
Update: the point of the parsing is to parse MANIFEST.getMainAttributes().getValue("Created-On");