public static LocalDateTime dateToLocalDateTime(Date date) {

        if (date == null) {
            return null;
        }
        return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
    }
public static LocalDateTime dateToLocalDateTime ( Date date ) { if ( date == null ) { return null ; } return LocalDateTime . ofInstant ( date . toInstant ( ) , ZoneId . systemDefault ( ) ) ; }
Converts a {@link Date} object to a {@link LocalDateTime} object.<p>

@param date the date

@return the local date time