Here you can find the source of toLocalDateTime(Timestamp timestamp)
public static LocalDateTime toLocalDateTime(Timestamp timestamp)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.time.LocalDateTime; import java.time.ZoneOffset; public class Main { public static LocalDateTime toLocalDateTime(Timestamp timestamp) { if (timestamp == null) { return null; }/*from w w w .j av a 2s. co m*/ return LocalDateTime.ofInstant(timestamp.toInstant(), ZoneOffset.systemDefault()); } }