class SystemClock : Clock
A clock that provides the time from the current system.
The time zone is treated as an immutable property of the clock, set when it is created. If you wish to follow changes to the system clock's configured time zone, you must create a new SystemClock in response to any time zone changes.
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
<init> |
Create a SystemClock with a specific time zone, defaulting to the system's current zone. <init>(zone: TimeZone = TimeZone.systemDefault()) |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
zone |
The clock's time zone. val zone: TimeZone |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
equals |
fun equals(other: Any?): Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
hashCode |
fun hashCode(): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
read |
Get the current number of milliseconds since the Unix epoch of 1970-01-01T00:00 in UTC. fun read(): LongMilliseconds |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
toString |
fun toString(): String |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
UTC |
A system clock in the UTC time zone. val UTC: SystemClock |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
currentZone |
Get the current system time zone. fun |