List of usage examples for java.time OffsetDateTime now
public static OffsetDateTime now()
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.withMinute(34); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.plusYears(20); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); System.out.println(o); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.withHour(4); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.plusMonths(20); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); int l = o.getDayOfYear(); System.out.println(l);/*from ww w. j av a 2s.c o m*/ }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); System.out.println(o.getHour()); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.minusNanos(1200); System.out.println(d);// w ww . ja v a 2 s .c om }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.withNano(1234); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); OffsetDateTime d = o.minusMonths(120); System.out.println(d);//from w ww. jav a2s . c o m }