List of usage examples for java.time OffsetTime now
public static OffsetTime now()
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(); OffsetDateTime n = m.atDate(LocalDate.now()); System.out.println(n);/*from w w w . j av a 2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(); Temporal n = m.adjustInto(OffsetTime.now(ZoneId.systemDefault())); System.out.println(n);// w w w. j a v a 2 s .c o m }
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(); ZoneOffset n = m.query(TemporalQueries.offset()); System.out.println(n);/* w w w . ja v a2s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { // current offset time OffsetTime ot1 = OffsetTime.now(); System.out.println("Current offset time: " + ot1); // a zone offset +01:30 ZoneOffset offset = ZoneOffset.ofHoursMinutes(1, 30); OffsetTime offsetTime = OffsetTime.of(16, 40, 28, 0, offset); System.out.println(offsetTime); }
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(); ValueRange z = m.range(ChronoField.HOUR_OF_DAY); System.out.println(z);/* w ww .j a va 2 s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); OffsetDateTime o = a.atTime(OffsetTime.now()); System.out.println(o);/*from w w w .j ava 2 s . c o m*/ }