Here you can find the source of dateToLocalDateTime(Date date)
public static ZonedDateTime dateToLocalDateTime(Date date)
//package com.java2s; //License from project: Apache License import java.time.Instant; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.Date; public class Main { public static ZonedDateTime dateToLocalDateTime(Date date) { Instant endDateInstant = Instant.ofEpochMilli(date.getTime()); return ZonedDateTime.ofInstant(endDateInstant, ZoneOffset.UTC); }//from ww w. j a v a2 s .c o m }