Java TimeZone.getDSTSavings()

Syntax

TimeZone.getDSTSavings() has the following syntax.

public int getDSTSavings()

Example

In the following code shows how to use TimeZone.getDSTSavings() method.


//from   ww  w . j a  va 2  s.c  om

import java.util.TimeZone;

public class Main {
    public static void main( String args[] ){
       
          
      TimeZone timezone = TimeZone.getTimeZone("Europe/Paris");
      
      // checking DST saving         
      System.out.println("DST saving is :" + timezone.getDSTSavings());
   }    
}

The code above generates the following result.