Here you can find the source of localDateTimeToTimestamp(LocalDateTime ldt)
public static long localDateTimeToTimestamp(LocalDateTime ldt)
//package com.java2s; //License from project: Apache License import java.time.LocalDateTime; import java.time.ZoneOffset; public class Main { public static long localDateTimeToTimestamp(LocalDateTime ldt) { return ldt.toEpochSecond(ZoneOffset.UTC); }// ww w .j a v a2 s. c o m }