例1.这里的时间本身就是错的,12和24小时混用 所以HH是大写,如果小写,就到30号了
SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日aHH:mm");// "yyyy-MM-dd HH:mm:ss");
System.out.println(formatter.parse("2017年11月29日下午13:30"));
输出 Wed Nov 29 13:30:00 GMT+08:00 2017
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
例2.正常用法hh
SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日ahh:mm");// "yyyy-MM-dd HH:mm:ss");
System.out.println(formatter.parse("2017年11月29日下午01:30"));
输出 Wed Nov 29 13:30:00 GMT+08:00 2017