Is there a simple way to convert a LocalDate (introduced with Java 8) to java.util.Date object?
By
By 'simple', I mean simpler than this:
Date date = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); which seems a bit awkward to me.
Since we are interested only in the date portion and there is no timezone information in neither of the objects, why introduce time zones explicitly? The midnight time and the system default timezone should be taken implicitly for the conversion.