List of usage examples for java.time Clock systemUTC
public static Clock systemUTC()
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); System.out.println(clock.instant()); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); System.out.println(clock.millis()); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); System.out.println(clock); System.out.println(clock.instant()); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); Clock clock1 = Clock.systemDefaultZone(); System.out.println(clock.equals(clock1)); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); Clock clock1 = Clock.systemDefaultZone(); System.out.println(clock.hashCode()); System.out.println(clock1.hashCode()); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); System.out.println(clock.getZone()); clock.withZone(ZoneId.systemDefault()); System.out.println(clock.getZone()); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.systemUTC(); Duration duration = Duration.ofHours(3); Clock newClock = Clock.offset(clock, duration); System.out.println(newClock.instant()); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(Clock.systemUTC()); System.out.println(m); }
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.now(Clock.systemUTC()); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { YearMonth y = YearMonth.now(Clock.systemUTC()); System.out.println(y); }