Here you can find the source of DateTime2LocalDateTime(Date datetime)
public static LocalDateTime DateTime2LocalDateTime(Date datetime)
//package com.java2s; //License from project: Open Source License import java.time.*; import java.util.Date; public class Main { public static LocalDateTime DateTime2LocalDateTime(Date datetime) { Instant timestamp = datetime.toInstant(); //Now we can convert Instant to LocalDateTime or other similar classes LocalDateTime localDateTime = LocalDateTime.ofInstant(timestamp, ZoneId.of(ZoneId.SHORT_IDS.get("CTT"))); return localDateTime; }//from w w w .j a va 2 s .com }