Java tutorial
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, true); // checking the new value System.out.println("New value : " + stobj); } }