core / io.islandtime / OffsetDateTime / <init>

<init>

(iosArm64, iosX64, jvm, macosX64) <init>(date: Date, time: Time, offset: UtcOffset)

Create an OffsetDateTime.

Exceptions

DateTimeException - if the offset is invalid

(iosArm64, iosX64, jvm, macosX64) <init>(year: Int, month: Month, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, offset: UtcOffset)
<init>(year: Int, monthNumber: Int, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanosecond: Int, offset: UtcOffset)

Create an OffsetDateTime.

Exceptions

DateTimeException - if the date-time or offset is invalid

(iosArm64, iosX64, jvm, macosX64) <init>(dateTime: DateTime, offset: UtcOffset)

Create an OffsetDateTime by combining a DateTime and UtcOffset.

Parameters

dateTime - the local date and time of day

offset - the offset from UTC

Exceptions

DateTimeException - if the offset is invalid

Constructor
Create an OffsetDateTime by combining a DateTime and UtcOffset.