java.util.SimpleTimeZone.inDaylightTime() 方法


java.util.SimpleTimeZone.inDaylightTime() 方法

package com.codingdict;

import java.util.*;

public class SimpleTimeZoneDemo {
   public static void main( String args[] ) {

      // create simple time zone object     
      SimpleTimeZone stobj1 = new SimpleTimeZone(820,"GMT");

      // create date
      Date date = new Date(2012, 04, 23);

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

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