Example usage for java.util SimpleTimeZone getDSTSavings

List of usage examples for java.util SimpleTimeZone getDSTSavings

Introduction

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

Prototype

public int getDSTSavings() 

Source Link

Document

Returns the amount of time in milliseconds that the clock is advanced during daylight saving time.

Usage

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(720, "US");

    // check DST saving
    int dstsaving = stobj.getDSTSavings();
    System.out.println("DST saving : " + dstsaving);
}

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj = new SimpleTimeZone(-28800000, "India", Calendar.MAY, 1, -Calendar.SUNDAY, 7200000,
            Calendar.OCTOBER, -1, Calendar.MONDAY, 7200000, 3600000);

    // setting DST saving time
    stobj.setDSTSavings(5400000);//from w  w  w . j a  v  a2 s. co  m

    // checking the value      
    System.out.println("DST saving value : " + stobj.getDSTSavings());
}