时间戳转LocalDateTime

早上一直在做,最后发现这么简单。。。

 

Long remindTime = 1534825831L;  //时间戳

LocalDateTime dateTime =LocalDateTime.ofEpochSecond(remindTime,0, ZoneOffset.ofHours(8));
posted @ 2018-08-21 12:31  wangbiubiu  阅读(32332)  评论(0编辑  收藏  举报