Java tutorial
import java.time.Instant; public class Main { public static void main(String[] args) { Instant instant = Instant.ofEpochMilli(123123123123L); System.out.println(instant.getEpochSecond()); } }