Java examples for java.time:ZoneId
local Date To Date via default ZoneId
//package com.java2s; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static Date localDateToDate(LocalDate date) { if (date == null) { return null; }// ww w . j av a 2 s .c o m return Date.from(date.atStartOfDay(ZoneId.systemDefault()) .toInstant()); } }