java.time.LocalDateTime.ofEpochSecond() 方法示例 java.time.LocalDateTime.of(int year, Month month, int dayOfMonth, int hour, int minute, int second, java.time.LocalDateTime.ofInstant() 方法示例 java.time.LocalDateTime.ofEpochSecond() 方法示例 package com.codingdict; import java.time.LocalDateTime; import java.time.ZoneOffset; public class LocalDateTimeDemo { public static void main(String[] args) { LocalDateTime date = LocalDateTime.ofEpochSecond(50000,50000,ZoneOffset.UTC); System.out.println(date); } } java.time.LocalDateTime.of(int year, Month month, int dayOfMonth, int hour, int minute, int second, java.time.LocalDateTime.ofInstant() 方法示例