withZone

open fun withZone(zone: ZoneId): MutableClock

Returns a MutableClock that uses the specified time-zone and that has shared updates with this clock.

Two clocks with shared updates always have the same instant, and all updates applied to either clock affect both clocks.

Return

a view of this clock in the specified time-zone, not null

Parameters

zone

the time-zone to use for the returned clock, not null