Example usage for java.util SimpleTimeZone inDaylightTime

List of usage examples for java.util SimpleTimeZone inDaylightTime

Introduction

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

Prototype

public boolean inDaylightTime(Date date) 

Source Link

Document

Queries if the given date is in daylight saving time.

Usage

From source file:Main.java

public static void main(String args[]) {

    SimpleTimeZone stobj1 = new SimpleTimeZone(820, "GMT");

    // create date
    Date date = new Date();

    // check day light
    boolean daylight = stobj1.inDaylightTime(date);

    // checking the value of day light      
    System.out.println("Is in day light : " + daylight);
}