OffsetTime.withOffsetSameInstant

Returns a copy of this {@code OffsetTime} with the specified offset ensuring that the result is at the same instant on an implied day. !(p) This method returns an object with the specified {@code ZoneOffset} and a {@code LocalTime} adjusted by the difference between the two offsets. This will result _in the old and new objects representing the same instant on an implied day. This is useful for finding the local time _in a different offset. For example, if this time represents {@code 10:30+02:00} and the offset specified is {@code +03:00}, then this method will return {@code 11:30+03:00}. !(p) To change the offset without adjusting the local time use {@link #withOffsetSameLocal}. !(p) This instance is immutable and unaffected by this method call.

@param offset the zone offset to change to, not null @return an {@code OffsetTime} based on this time with the requested offset, not null

class OffsetTime
withOffsetSameInstant

Meta