Here you can find the source of toLocalDateTime(Date date)
public static LocalDateTime toLocalDateTime(Date date)
//package com.java2s; //License from project: Open Source License import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; public class Main { public static final ZoneId DEFAULT_ZONEID = ZoneId.systemDefault(); public static LocalDateTime toLocalDateTime(Date date) { return LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), DEFAULT_ZONEID); }//from ww w . j av a 2 s.c om }