new

fun new(year: Int, month: Int, day: Int, hourIn24: Int = 0, minute: Int = 0, second: Int = 0, nano: Int = 0, useSystemTimeZone: Boolean = true): ZonedDateTime

Return

ZonedDateTime.

Parameters

year

Year, ie, 2020.

month

Month with range 1-12, i.e. 1 for January.

day

Day of the month with range 1-31.

hourIn24

Hour of the day with range 0-23.

minute

Minute of the hour with range 0-59.

second

Second of the minute with range 0-59.

nano

Nano-of-second to represent, from 0 to 999,999,999.

useSystemTimeZone

If true, sets the time zone of the device, else UTC.


fun new(year: Int, month: Int, day: Int, hour: Int = 0, minute: Int = 0, second: Int = 0, nano: Int = 0, isAm: Boolean, useSystemTimeZone: Boolean = true): ZonedDateTime

Return

ZonedDateTime.

Parameters

year

Year, ie, 2020.

month

Month with range 1-12, i.e. 1 for January.

day

Day of the month with range 1-31.

hour

Hour of the day with range 1-12.

minute

Minute of the hour with range 0-59.

second

Second of the minute with range 0-59.

nano

Nano-of-second to represent, from 0 to 999,999,999.

isAm

If true, sets assumes hour is in the AM, else PM.

useSystemTimeZone

If true, sets the time zone of the device, else UTC.


fun new(epochMilliseconds: Long, useSystemTimeZone: Boolean = true): ZonedDateTime

Return

ZonedDateTime.

Parameters

epochMilliseconds

Epoch time, aka Unix time, are seconds elapsed since January 1st 1970 at 00:00:00 UTC.

useSystemTimeZone

If true, converts to time zone of the device, else leaves as UTC.