currentDateTime

fun currentDateTime(timeZone: TimeZone = TimeZone.currentSystemDefault()): LocalDateTime

Reads the current local date and time.

remember*State initial values default to this, and apps can call it for the same purpose. The value is read at call time, so a long-running app never observes a stale composition-time clock.

Return

The current LocalDateTime in timeZone.

Parameters

timeZone

The time zone used to convert the current instant. Defaults to the system time zone; pass an explicit zone when the picker represents time in a fixed or user-selected zone.