Here you can find the source of localDateTime(Date date, Clock clock)
public static LocalDateTime localDateTime(Date date, Clock clock)
//package com.java2s; //License from project: Open Source License import java.time.Clock; import java.time.LocalDateTime; import java.util.Date; public class Main { private static final Clock DEFAULT_CLOCK = Clock.systemUTC(); /**// w w w . ja v a 2 s . c o m * @return passed in date converted to local date time using the provided clock */ public static LocalDateTime localDateTime(Date date, Clock clock) { return LocalDateTime.ofInstant(date.toInstant(), clock.getZone()); } /** * @return passed in date converted to local date time using the default clock */ public static LocalDateTime localDateTime(Date date) { return localDateTime(date, DEFAULT_CLOCK); } }