public static void main(String[] args) {
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS").withLocale(Locale.CHINA);
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS").withZone(ZoneId.of("Asia/Shanghai"));
// 1.定义转换后的时间显示格式
DateTimeFormatter formatter0 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS").withZone(ZoneId.of("Asia/Shanghai"));
// 2.输入时间
LocalDateTime now = LocalDateTime.now();
// 3.格式化输出
String nowTime = now.format(formatter);
System.out.println(nowTime);
System.out.println(TimeZone.getDefault().toZoneId());
}