At DST onset, the local time jumps forward. A time falls into this hole is ambiguous. With Sun Java Calendar implementation, the ambiguous time is interpreted as local standard time. For example, March 11, 2007 2:30AM in US Eastern time is interpreted as March 11, 2007 3:30AM EDT. However, ICU4J implementation interprets it as March 11, 2007 1:30 EST. The following code snipet illustrates the issue. This problem is also reproduced with ICU4C.
package com.ibm.icu.bugs;
import java.util.Date;
import java.util.Locale;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.TimeZone;
//import com.ibm.icu.text.DateFormat;
//import com.ibm.icu.util.Calendar;
//import com.ibm.icu.util.TimeZone;
public class DSTTransition {
public static void main(String[] args) {
TimeZone tz = TimeZone.getTimeZone("America/New_York");
Calendar cal = Calendar.getInstance(tz, Locale.US);
cal.clear();
cal.set(2007, Calendar.MARCH, 11, 2, 30);
System.out.println(cal.get(Calendar.HOUR_OF_DAY) + ":" + cal.get(Calendar.MINUTE));
System.out.println(cal.get(Calendar.DST_OFFSET) > 0 ? "DST" : "STD");
}
}