to Offset Date Time
Returns the combined date, time, and UTC offset.
While similar to ZonedDateTime, an OffsetDateTime representation is unaffected by time zone rule changes or database differences between systems, making it better suited for use cases involving persistence or network transfer.
Converts a string to an OffsetDateTime.
The string is assumed to be an ISO-8601 date-time with the UTC offset in extended format. For example, 2019-05-30T02:30+01:00. The output of OffsetDateTime.toString can be safely parsed using this method.
Throws
if parsing fails
if the parsed date-time or offset is invalid
Converts a string to an OffsetDateTime using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Any custom parser must be capable of supplying the fields necessary to resolve a Date, Time and UtcOffset.
Throws
if parsing fails
if the parsed date-time or offset is invalid