Clock.System(ZoneId) Method

Definition

Obtains a clock that returns the current instant using the best available system clock.

[Android.Runtime.Register("system", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=26)]
public static Java.Time.Clock? System(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("system", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=26)>]
static member System : Java.Time.ZoneId -> Java.Time.Clock

Parameters

zone
ZoneId

the time-zone to use to convert the instant to date-time, not null

Returns

a clock that uses the best available system clock in the specified zone, not null

Attributes

Remarks

Obtains a clock that returns the current instant using the best available system clock. This clock is based on the best available system clock. This may use System.currentTimeMillis(), or a higher resolution clock if one is available. Conversion from instant to date or time uses the specified time-zone. The returned implementation is immutable, thread-safe and Serializable.

Java reference for java.time.Clock.system.

Applies to