我尝试以 YYYY-MM-DD HH:mm:ss 格式解析日期
String now = "2012-11-02 12:02:00";
DateFormat formatter;
formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
Date date_temp = (Date) formatter.parse(now.toString());
System.out.println("output: " + date_temp);
它给了我以下异常
java.text.ParseException: Unparseable date: "2012-11-02 12:02:00"