ChronoZonedDateTime.withZoneSameLocal

Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible. !(p) This method changes the time-zone and retains the local date-time. The local date-time is only changed if it is invalid for the new zone. !(p) To change the zone and adjust the local date-time, use {@link #withZoneSameInstant(ZoneId)}. !(p) This instance is immutable and unaffected by this method call.

@param zone the time-zone to change to, not null @return a {@code ChronoZonedDateTime} based on this date-time with the requested zone, not null

interface ChronoZonedDateTime(D = ChronoLocalDate)
withZoneSameLocal

Meta