Java ZonedDateTime toOffsetDateTime() Method
The toOffsetDateTime() method in Java, part of the java.time.ZonedDateTime class, converts this ZonedDateTime to an OffsetDateTime. This method is useful for converting a ZonedDateTime to an OffsetDateTime, which represents the same date-time with an offset from UTC/Greenwich.