Example usage for java.util SimpleTimeZone hasSameRules

List of usage examples for java.util SimpleTimeZone hasSameRules

Introduction

In this page you can find the example usage for java.util SimpleTimeZone hasSameRules.

Prototype

public boolean hasSameRules(TimeZone other) 

Source Link

Document

Returns true if this zone has the same rules and offset as another zone.

Usage

From source file:Main.java

public static void main(String args[]) {
    // create two simple time zone object 
    SimpleTimeZone stobj1 = new SimpleTimeZone(820, "US");
    SimpleTimeZone stobj2 = new SimpleTimeZone(820, "GMT");

    // check rules for both objects
    boolean samerule = stobj1.hasSameRules(stobj2);

    // checking the value       
    System.out.println("Hash same rule : " + samerule);
}