private static final String FORMAT = "yyyy-MM-dd HH:mm:ss";
LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochSecond(1000000000L), ZoneId.systemDefault());
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(FORMAT);
String date = localDateTime.format(dateTimeFormatter);
System.err.println(date);
网友评论