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(); dateTime = dateTime.withYear(2000);// w ww .j a v a2 s .com System.out.println(dateTime); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusHours(1234); System.out.println(n);/*ww w. ja v a 2 s.c om*/ }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusYears(12); System.out.println(n);// ww w.j a v a2s .c o m }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.getMonthValue()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.getOffset()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.getMinute()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.getMonth()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.minusMinutes(1234); System.out.println(n);/*ww w . j a v a 2 s. com*/ }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); System.out.println(dateTime.getNano()); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime dateTime = ZonedDateTime.now(); ZonedDateTime n = dateTime.withDayOfMonth(14); System.out.println(n);/*from w w w. j a va 2 s . c o m*/ }