LocalDateTime与时间戳互转

``` long epochMilli = LocalDateTime.now().plusHours(2).toInstant(ZoneOffset.UTC).toEpochMilli(); log.info("timestamp={}", epochMilli); Instant instant
posted @ 2023-08-23 11:06  qing222  阅读(191)  评论(0编辑  收藏  举报