//获取秒数 Long second = LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")); //获取毫秒数 Long milliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
Java8 LocalDateTime获取时间戳(毫秒/秒)
猜你喜欢
转载自blog.csdn.net/u014044812/article/details/79231738
今日推荐
周排行