Here you can find the source of convert(LocalDate ld)
public static Date convert(LocalDate ld)
//package com.java2s; //License from project: Open Source License import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; public class Main { public static Date convert(LocalDate ld) { Instant instant = ld.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant(); return Date.from(instant); }//from ww w . j a v a2 s . c o m public static Date convert(LocalDateTime ldt) { Instant instant = ldt.atZone(ZoneId.systemDefault()).toInstant(); return Date.from(instant); } public static LocalDateTime convert(Date date) { Instant instant = Instant.ofEpochMilli(date.getTime()); return LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); } }