This is useful because the existing methods allow you to parse a LocalDateTime only. This class requires extra information about zone or offset to be able to precisely identify a moment in time. Using Instant is a much better approach, and works regardless of JVM or OS time zone settings, handles DST etc.
This is useful because the existing methods allow you to parse a
LocalDateTime
only. This class requires extra information about zone or offset to be able to precisely identify a moment in time. UsingInstant
is a much better approach, and works regardless of JVM or OS time zone settings, handles DST etc.