Java 8's LocalDateTime
has an ofEpochSecond
method. Unfortunately, there is no such method in the ZonedDateTime
. Now, I have an Epoch value and an explicit ZoneId
given. How do I get a ZonedDateTime
out of these?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You should be able to do this via the
Instant
class, which can represent a moment given the epoch time. If you have epoch seconds, you might create something via something like