/** * Return true if the current time for this Calendar is in Daylignt * Savings Time. */ boolean inDaylightTime() { if (!getTimeZone().useDaylightTime()) return false; complete(); // Force update of DST_OFFSET field return internalGet(DST_OFFSET) != 0; }
GregorianCalendar cal = new GregorianCalendar(getTimeZone()); cal.setTime(date); gregorianCutoverYear = cal.get(EXTENDED_YEAR);