Example usage for java.time Clock getZone

List of usage examples for java.time Clock getZone

Introduction

In this page you can find the example usage for java.time Clock getZone.

Prototype

public abstract ZoneId getZone();

Source Link

Document

Gets the time-zone being used to create dates and times.

Usage

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.systemDefaultZone();

    System.out.println(clock.getZone());
}