Java tutorial
import java.util.Date; import java.util.TimeZone; public class Main { public static void main(String args[]) { TimeZone timezoneone = TimeZone.getDefault(); // create date object Date date = new Date(); // checking day light System.out.println("In daylight time:" + timezoneone.inDaylightTime(date)); } }