Clock.WithZone(ZoneId) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of this clock with a different time-zone.
[Android.Runtime.Register("withZone", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "GetWithZone_Ljava_time_ZoneId_Handler", ApiSince=26)]
public virtual Java.Time.Clock? WithZone(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("withZone", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "GetWithZone_Ljava_time_ZoneId_Handler", ApiSince=26)>]
abstract member WithZone : Java.Time.ZoneId -> Java.Time.Clock
override this.WithZone : Java.Time.ZoneId -> Java.Time.Clock
Parameters
- zone
- ZoneId
the time-zone to change to, not null
Returns
a clock based on this clock with the specified time-zone, not null
Implements
- Attributes
Remarks
Returns a copy of this clock with a different time-zone. A clock will typically obtain the current instant and then convert that to a date or time using a time-zone. This method returns a clock with similar properties but using a different time-zone.
Java reference for java.time.Clock.withZone.