java8时间转换
2017-06-08 本文已影响0人
Feng_Sir
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);