toInstant

fun toInstant(serviceDate: LocalDate, timezone: TimeZone): Instant(source)

Converts this service time to an kotlin.time.Instant on the given serviceDate in the specified timezone. If the service time represents a time after midnight (hours> 23), the resulting instant will fall on the next calendar day.

Return

The corresponding instant in time

Parameters

serviceDate

The service date to which this service time belongs

timezone

The timezone in which to interpret the service time