I'm triyng to make a program read a date from a txt file into a Date object. Here is the code I'm using :
reader = new FileReader(fich);
rd = new Scanner(reader);
DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy");
Date tmpdate= formatter.parse(rd.nextLine());
And this is the line I want to read: Fri Feb 20 01:23:35 GMT 2015
and then it shows up this error: Exception in thread "main" java.text.ParseException: Unparseable date: "Fri Feb 20 01:23:35 GMT 2015"
what is wrong?