Java tutorial
import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static void main(String[] args) { System.out.println(asLocalDateIn(new Date(), ZoneId.systemDefault())); } public static LocalDate asLocalDateIn(Date date, ZoneId timeZone) { return date.toInstant().atZone(timeZone).toLocalDate(); } }