Java tutorial
import java.util.SimpleTimeZone; public class Main { 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); } }