Java tutorial
import java.util.TimeZone; public class Main { public static void main(String args[]) { 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); } }