Java TimeZone.useDaylightTime()

Syntax

TimeZone.useDaylightTime() has the following syntax.

public abstract boolean useDaylightTime()

Example

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


/*  ww  w .j  a v a 2s .  c  o m*/

import java.util.TimeZone;

public class Main {
   public static void main( String args[] ){
       
      
      TimeZone tzone = TimeZone.getDefault();      

      // checking daylight time
      System.out.println("Using day light time :" +tzone.useDaylightTime());
   }    
}

The code above generates the following result.