通过时间戳转换为Date或LocalDateTime对象
可以使用new Date(System.currentTimeMillis())直接生成Date对象,或者通过Instant.ofEpochMilli(System.currentTimeMillis())结合LocalDateTime.ofInstant()转换成更现代的时间日期对象。
通过时间戳转换为Date或LocalDateTime对象
可以使用new Date(System.currentTimeMillis())直接生成Date对象,或者通过Instant.ofEpochMilli(System.currentTimeMillis())结合LocalDateTime.ofInstant()转换成更现代的时间日期对象。