List of usage examples for java.time ZonedDateTime now
public static ZonedDateTime now()
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusSeconds(1234); System.out.println(n);//from ww w . ja va 2 s. c om }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.withDayOfYear(14); System.out.println(n);// w w w. j av a2 s . com }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusMonths(12); System.out.println(n);/*www .java 2 s .c o m*/ }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.plusMinutes(1234); System.out.println(n);//from w ww. j a v a2 s . c o m }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.equals(ZonedDateTime.now())); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime l = dateTime.withEarlierOffsetAtOverlap(); System.out.println(l);// w w w . j a va2 s . c o m }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime l = dateTime.withFixedOffsetZone(); System.out.println(l);// w w w . j a va 2s . c om }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusDays(1234); System.out.println(n);/*from ww w.ja v a 2 s .c o m*/ }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.plusDays(1234); System.out.println(n);/* w ww.j av a 2 s. c om*/ }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.plusNanos(1234); System.out.println(n);/*from www . j a v a 2s . co m*/ }