利用SimpleDateFormat或者LocalDateTime生成格式为“yyyy-MM-dd HH:mm:ss“的当前时间
java程序://利用LocalDateTime生成格式为"yyyy-MM-ddHH:mm:ss"的当前时间DateTimeFormatterformatter=DateTimeFormatter.ofPattern("yyyy-MM-ddHH:mm:ss");LocalDateTimenow=LocalDateTime.now();Stringtime1=now.format(formatter