Here you can find the source of asLocalDate(java.util.Date date, ZoneId zone)
public static LocalDate asLocalDate(java.util.Date date, ZoneId zone)
//package com.java2s; import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; public class Main { public static LocalDate asLocalDate(java.util.Date date) { return asLocalDate(date, ZoneId.systemDefault()); }/*from w w w .j av a 2s .co m*/ public static LocalDate asLocalDate(java.util.Date date, ZoneId zone) { if (date == null) return null; if (date instanceof java.sql.Date) return ((java.sql.Date) date).toLocalDate(); else return Instant.ofEpochMilli(date.getTime()).atZone(zone) .toLocalDate(); } }