ZoneOffset getRules() example
Description
ZoneOffset getRules()
gets the associated time-zone rules.
Syntax
getRules
has the following syntax.
public ZoneRules getRules()
Example
The following example shows how to use getRules
.
import java.time.ZoneOffset;
import java.time.zone.ZoneRules;
// w w w . j a va 2 s . c o m
public class Main {
public static void main(String[] args) {
ZoneOffset z = ZoneOffset.UTC;
ZoneRules t = z.getRules();
System.out.println(t);
}
}
The code above generates the following result.