List of usage examples for java.time ZoneId systemDefault
public static ZoneId systemDefault()
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.tickSeconds(ZoneId.systemDefault()); System.out.println(clock);// w ww . j a v a2 s .c o m System.out.println(clock.instant()); }
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.now(ZoneId.systemDefault()); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.now(ZoneId.systemDefault()); System.out.println(a); }
From source file:Main.java
public static void main(String[] args) { Clock clock = Clock.tickMinutes(ZoneId.systemDefault()); System.out.println(clock);//from w w w .ja v a 2 s . c o m System.out.println(clock.instant()); }
From source file:Main.java
public static void main(String[] args) { YearMonth y = YearMonth.now(ZoneId.systemDefault()); System.out.println(y); }
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(ZoneId.systemDefault()); System.out.println(m); }
From source file:Main.java
public static void main(String[] args) { OffsetTime m = OffsetTime.now(ZoneId.systemDefault()); System.out.println(m.toString()); }
From source file:Main.java
public static void main(String[] args) { // Time Zone//from w w w .ja v a 2 s . c o m ZoneId zone = ZoneId.systemDefault(); System.out.println(Clock.system(zone)); System.out.println(Clock.system(ZoneId.of("Europe/Berlin"))); }
From source file:Main.java
public static void main(String[] args) { ZonedDateTime z = ZonedDateTime.now(ZoneId.systemDefault()); System.out.println(z); }
From source file:Main.java
public static void main(String[] argv) { System.out.println(new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); }