core / io.islandtime / at

at

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Date.at(time: Time): DateTime

Combine a Date with a Time to create a DateTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun DateTime.at(offset: UtcOffset): OffsetDateTime

Combine a local date and time with a UTC offset to create an OffsetDateTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Date.at(offsetTime: OffsetTime): OffsetDateTime

Combine a local date with a time and UTC offset to create an OffsetDateTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Instant.at(offset: UtcOffset): OffsetDateTime

Combine an instant with a UTC offset to create an OffsetDateTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Time.at(offset: UtcOffset): OffsetTime

Combine a local time with a UTC offset to create an OffsetTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Year.at(month: Month): YearMonth

Combine a year and month to create a YearMonth.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun Instant.at(zone: TimeZone): ZonedDateTime

Combine an instant with a time zone to create a ZonedDateTime.

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) infix fun DateTime.at(zone: TimeZone): ZonedDateTime

Combine a local date and time with a time zone to create a ZonedDateTime.

Due to daylight savings time transitions, there a few complexities to be aware of. If the local time falls within a gap (meaning it doesn't exist), it will be adjusted forward by the length of the gap. If it falls within an overlap (meaning the local time exists twice), the earlier offset will be used.