package com.logicbig.example.localdatetime;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
public class OfEpochSecondExample {
public static void main (String... args) {
LocalDateTime d = LocalDateTime.ofEpochSecond(200000, 100000,
ZoneOffset.of("-6"));
System.out.println(d);
d = LocalDateTime.ofEpochSecond(-200000, 100000,
ZoneOffset.of("-6"));
System.out.println(d);
}
}
Output
1970-01-03T01:33:20.000100
1969-12-29T10:26:40.000100