Java Date Time - 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  w ww  .  j av  a 2s.  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.