📌  相关文章
📜  将本地日期时间转换为即时 java 代码示例

📅  最后修改于: 2022-03-11 14:52:05             🧑  作者: Mango

代码示例2
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

// ...

//Convert instant to LocalDateTime, no timezone, add a zero offset / UTC+0
LocalDateTime ldt = LocalDateTime.ofInstant(instant, ZoneOffset.UTC);