SimpleTimeZone.setEndRule(int endMonth, int endDay, int endTime) has the following syntax.
public void setEndRule(int endMonth, int endDay, int endTime)
In the following code shows how to use SimpleTimeZone.setEndRule(int endMonth, int endDay, int endTime) method.
//from w w w . j a v a 2 s .c o m import java.util.Calendar; import java.util.SimpleTimeZone; public class Main { public static void main( String args[] ){ SimpleTimeZone stobj = new SimpleTimeZone(820,"GMT"); // checking the initial value System.out.println("Initial value : " + stobj); // setting end rule stobj.setEndRule( Calendar.MAY, 2, Calendar.TUESDAY, 3600000); // checking the new value System.out.println("New value : " + stobj); } }
The code above generates the following result.