String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
String s = LocalDate.now().toString();
注:LocalDate.now()格式为:java.time.LocalDate