java.util.SimpleTimeZone.hasSameRules(TimeZone other) 方法


java.util.SimpleTimeZone.hasSameRules(TimeZone other) 方法

package com.codingdict;

import java.util.*;

public class SimpleTimeZoneDemo {
   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);
   }    
}