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


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

package com.codingdict;

import java.util.*;

public class TimeZoneDemo {
   public static void main( String args[] ) {

      // create two time zone objects     
      TimeZone timezoneone = TimeZone.getDefault();
      TimeZone timezonetwo = TimeZone.getDefault();

      // comparing two time zones
      boolean res = timezoneone.hasSameRules(timezonetwo);

      // checking the result   
      System.out.println("Comparison result:" +res );
   }    
}