Example usage for java.util SimpleTimeZone setEndRule

List of usage examples for java.util SimpleTimeZone setEndRule

Introduction

In this page you can find the example usage for java.util SimpleTimeZone setEndRule.

Prototype

public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) 

Source Link

Document

Sets the daylight saving time end rule to a weekday before or after the given date within a month, e.g., the first Monday on or after the 8th.

Usage

From source file:Main.java

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);
}