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)
.
Diagram: LocalTime