Language

Clock.SystemUTC Method

Definition

Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the UTC time-zone.

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

Returns

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

Attributes

Remarks

Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the UTC time-zone. This clock, rather than systemDefaultZone(), should be used when you need the current instant without the date or time. 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 UTC time-zone. The returned implementation is immutable, thread-safe and Serializable. It is equivalent to system(ZoneOffset.UTC).

Java reference for java.time.Clock.systemUTC.

Applies to