List of usage examples for java.time Instant getEpochSecond
public long getEpochSecond()
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.MIN; System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant i1 = Instant.now(); long seconds = i1.getEpochSecond(); System.out.println(seconds);// w ww . j a v a 2 s . c o m int nanoSeconds = i1.getNano(); System.out.println(nanoSeconds); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.MAX; System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.now(); System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.EPOCH; System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.from(ZonedDateTime.now()); System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.ofEpochMilli(123123123123L); System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.ofEpochSecond(123123123123L); System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.getEpochSecond()); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.now(Clock.systemDefaultZone()); System.out.println(instant.getEpochSecond()); }