一:以毫秒为单位ms
DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
String dateformat= df.format(LocalDateTime.ofInstant(Instat.ofEpochMilli(1610367215462L),ZoneId.of("Asia/Shanghai")))
二:以秒为单位s
DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String dateFormat=df.format(LocalDateTime.ofInstant(Instat.ofEpocSecond(1610367215462L),ZoneId.of("Asia/Shanghai")))