There are various methods on LocalDate
for this, including:
LocalDate::toDateTimeAtCurrentTime()
LocalDate::toDateTimeAtStartOfDay()
LocalDate::toDateTime( LocalTime )
LocalDate::toDateTime( LocalTime , DateTimeZone )
You have to be explicit about what you want the time component to be in the resulting DateTime
object, which is why DateTime
‘s general-conversion constructor can’t do it.