Udostępnij za pośrednictwem


IInstantSource.WithZone(ZoneId) Method

Definition

Returns a clock with the specified time-zone.

[Android.Runtime.Register("withZone", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "GetWithZone_Ljava_time_ZoneId_Handler:Java.Time.IInstantSource, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
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:Java.Time.IInstantSource, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
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 use, not null

Returns

a clock based on this source with the specified time-zone, not null

Attributes

Remarks

Returns a clock with the specified time-zone.

This returns a Clock, which is an extension of this interface that combines this source and the specified time-zone.

The returned implementation is immutable, thread-safe and Serializable providing that this source is.

Java documentation for java.time.InstantSource.withZone(java.time.ZoneId).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to