List of usage examples for java.time Instant parse
public static Instant parse(final CharSequence text)
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.compareTo(Instant.now())); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.plusNanos(10000);//from w w w. ja v a2s . c o m System.out.println(instant); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.minusNanos(10000); System.out.println(instant);/*from ww w . jav a 2 s .c o m*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.minusMillis(10000); System.out.println(instant);/*from w w w . jav a 2 s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.plusMillis(10000); System.out.println(instant);/* w w w . ja v a2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.minusSeconds(10000); System.out.println(instant);/*from w ww. j a v a 2 s . c om*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.plusSeconds(10000); System.out.println(instant);/*from w w w.j av a2 s . c om*/ }
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.atZone(ZoneId.systemDefault())); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.plus(Duration.ofDays(100)); System.out.println(instant);/*from w w w .j a va 2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.minus(Duration.ofDays(100)); System.out.println(instant);/* w w w .j a v a 2s .c o m*/ }