Returns a copy of this date-time with a different time-zone, retaining the instant.
This method changes the time-zone and retains the instant. This normally results in a change to the local date-time.
This method is based on retaining the same instant, thus gaps and overlaps in the local time-line have no effect on the result.
To change the offset while keeping the local time,
use withZoneSameLocal(ZoneId)
.
zone | the time-zone to change to, not null |
ChronoZonedDateTime
based on this date-time with the requested zone, not null
DateTimeException | if the result exceeds the supported date range |
Diagram: ZonedDateTime