id

actual val id: String(source)
expect val id: String(source)

Returns the identifier string of the time zone.

This identifier can be used later for finding this time zone with TimeZone.of function.

Samples

import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlin.test.*

fun main() { 
   //sampleStart 
   // Getting the ID of a time zone
check(TimeZone.of("America/New_York").id == "America/New_York") 
   //sampleEnd
}
actual val id: String(source)
actual open val id: String(source)