ParseException - Can't figure out the right pattern
问题 I have the following string: dateToParse = "Fri May 16 23:59:59 BRT 2014" , and want to parse it using DateFormat: DateFormat dateFormat = new SimpleDateFormat(pattern, Locale.getDefault()); Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("America/Sao_Paulo")); cal.setTime(dateFormat.parse(dateToParse)); right now I'm trying it with pattern = "EEE MMM dd HH:mm:ss z yyyy" , but get this exception: java.text.ParseException: Unparseable date: "Fri May 16 23:59:59 BRT 2014" (at offset 0)