OffsetDateTime.atZoneSameInstant

Combines this date-time with a time-zone to create a {@code ZonedDateTime} ensuring that the result has the same instant. !(p) This returns a {@code ZonedDateTime} formed from this date-time and the specified time-zone. This conversion will ignore the visible local date-time and use the underlying instant instead. This avoids any problems with local time-line gaps or overlaps. The result might have different values for fields such as hour, minute an even day. !(p) To attempt to retain the values of the fields, use {@link #atZoneSimilarLocal(ZoneId)}. To use the offset as the zone ID, use {@link #toZonedDateTime()}.

@param zone the time-zone to use, not null @return the zoned date-time formed from this date-time, not null

class OffsetDateTime
atZoneSameInstant

Meta