Hi all, This patch removes the explicitDSTOffset stuff from Calendar. I'm not sure what the final solution to this is but the present method of locking the DST offset once set is not it.
Cheers, Gary
Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.9239.2.1 diff -u -r1.9239.2.1 ChangeLog --- ChangeLog 12 Apr 2007 15:29:51 -0000 1.9239.2.1 +++ ChangeLog 13 Apr 2007 07:40:38 -0000 @@ -1,3 +1,10 @@ +2007-04-13 Gary Benson <[EMAIL PROTECTED]> + + * java/util/Calendar.java + (explicitDSTOffset): Remove. + (set(int, int)): Remove explicitDSTOffset stuff. + (set(int, int, int)): Likewise. + 2007-04-12 Gary Benson <[EMAIL PROTECTED]> * java/util/GregorianCalendar.java Index: java/util/Calendar.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/Calendar.java,v retrieving revision 1.52 diff -u -r1.52 Calendar.java --- java/util/Calendar.java 29 Dec 2006 02:17:58 -0000 1.52 +++ java/util/Calendar.java 13 Apr 2007 07:40:38 -0000 @@ -1,5 +1,5 @@ /* Calendar.java -- - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -443,13 +443,6 @@ private int minimalDaysInFirstWeek; /** - * Is set to true if DST_OFFSET is explicitly set. In that case - * it's value overrides the value computed from the current - * time and the timezone. - */ - private boolean explicitDSTOffset = false; - - /** * The version of the serialized data on the stream. * <dl><dt>0 or not present</dt> * <dd> JDK 1.1.5 or later.</dd> @@ -846,12 +839,10 @@ isSet[AM_PM] = true; isSet[HOUR_OF_DAY] = false; break; - case DST_OFFSET: - explicitDSTOffset = true; } // May have crossed over a DST boundary. - if (! explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET)) + if (field != DST_OFFSET && field != ZONE_OFFSET) isSet[DST_OFFSET] = false; } @@ -875,8 +866,7 @@ isSet[DAY_OF_WEEK_IN_MONTH] = false; isSet[ERA] = false; - if (! explicitDSTOffset) - isSet[DST_OFFSET] = false; // May have crossed a DST boundary. + isSet[DST_OFFSET] = false; // May have crossed a DST boundary. } /**