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