Get observes Daylight Time from SimpleTimeZone : Date Time « JDK 7 « Java






Get observes Daylight Time from SimpleTimeZone


import java.util.Calendar;
import java.util.SimpleTimeZone;

public class Test {
  public static void main(String[] args) {
    SimpleTimeZone simpleTimeZone = new SimpleTimeZone(-21600000, "CST",
        Calendar.MARCH, 1, -Calendar.SUNDAY, 7200000, Calendar.NOVEMBER, -1,
        Calendar.SUNDAY, 7200000, 3600000);

    System.out.println(simpleTimeZone.getDisplayName() + " - "
        + simpleTimeZone.observesDaylightTime());


  }
}

 








Related examples in the same category

1.Handling weeks in Java 1.7