toZonedDateTime
toZonedDateTime
converts the supplied variables into a ZonedDateTime.
Syntax
toInstant(instant, timeZone)
toInstant(date, time, timeZone)
Parameters
Parameter | Type | Description |
---|---|---|
instant | Instant | The Instant to convert. |
date | LocalDate | The local date. |
time | LocalTime | The local time. |
timeZone | ZoneId | The time zone. |
Returns
A ZonedDateTime.
Examples
date = parseLocalDate(today())
time = parseLocalTime("11:11:11")
tz = timeZone("ET")
zdt = toZonedDateTime(date, time, tz)
println zdt
- Log