Java examples for java.time:LocalDateTime
convert Unix To LocalDateTime
//package com.java2s; import java.time.LocalDateTime; import java.time.ZoneOffset; public class Main { /**// w w w . ja v a 2 s.c om * * @param unixTime expressed in seconds since January 1 1970 GMT, standard epoch * @return */ public static LocalDateTime convertUnixToLocalDateTime(long unixTime) { return LocalDateTime.ofEpochSecond(unixTime, 0, ZoneOffset.UTC); } }