{@code OffsetDateTime} is an immutable representation of a date-time with an offset.This class stores all date and time fields, to a precision of nanoseconds, as well as the offset from UTC/Greenwich. For example, the value "2nd October 2007 at 13:45.30.123456789 +02:00" can be stored in an {@code OffsetDateTime}.
{@code OffsetDateTime}, {@link java.time.ZonedDateTime} and {@link java.time.Instant} all store an instanton the time-line to nanosecond precision. {@code Instant} is the simplest, simply representing the instant.{@code OffsetDateTime} adds to the instant the offset from UTC/Greenwich, which allowsthe local date-time to be obtained. {@code ZonedDateTime} adds full time-zone rules.
It is intended that {@code ZonedDateTime} or {@code Instant} is used to model datain simpler applications. This class may be used when modeling date-time concepts in more detail, or when communicating to a database or in a network protocol.
This is a value-based class; use of identity-sensitive operations (including reference equality ( {@code ==}), identity hash code, or synchronization) on instances of {@code OffsetDateTime} may have unpredictable results and should be avoided.The {@code equals} method should be used for comparisons. @implSpec This class is immutable and thread-safe. @since 1.8
|
|
|
|
|
|
|
|