What is the best way to convert from java.time.LocalDate
to java.util.Date
?
Date.from(dateToReturn.atStartOfDay(ZoneId.systemDefault()).toInstant()
I have been trying this one but does not seem to work correct with the time although converts the date month and year correctly.
Update : java.time.LocalDate does not save time informations Just used java.time.LocalDateTime instead and everything works fine.