tomcat日志里面的时间格式化("28/Oct/2019:16:53:46 +0800")

SimpleDateFormat formatter = new SimpleDateFormat("dd/MMM/yyyy:hh:mm:ss Z", Locale.ENGLISH);

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

try {
 String date==
"24/Jun/2015:09:22:09 +0800";
    System.out.println(sdf.format(formatter.parse(date))); 
} catch (ParseException e1) {    
    e1.printStackTrace();
}
原文地址:https://www.cnblogs.com/KdeS/p/11898638.html