SimpleDateFormat和java8日期格式化 DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); df.format(xxx);