Clock getZone()
gets the time-zone
used to create dates and times.
getZone
has the following syntax.
public abstract ZoneId getZone()
The following example shows how to use getZone
.
import java.time.Clock; public class Main { public static void main(String[] args) { Clock clock = Clock.systemDefaultZone(); System.out.println(clock.getZone()); } }
The code above generates the following result.