core / io.islandtime / ZonedDateTime / fromLocal

fromLocal

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun fromLocal(dateTime: DateTime, zone: TimeZone, preferredOffset: UtcOffset? = null): ZonedDateTime

Creates a ZonedDateTime from a local date and time, optionally using a preferred offset. If the local date and time fall during an overlap, preferredOffset will be used if it represents one of the two valid offsets. If it is null or invalid, it will be ignored.