[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: fix for DST setting in Calendar
Kaffe CVS
cvs-commits at kaffe.org
Mon Nov 1 01:16:34 PST 2004
PatchSet 5392
Date: 2004/11/01 09:12:22
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: fix for DST setting in Calendar
2004-11-01 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/util/Calendar.java:
Resynced with GNU Classpath.
2004-10-31 Noa Resare <noa at resare.com>
* java/util/Calendar.java (explicitDSTOffset): New instance field.
(set(int,int)): Set and use new field.
(set(int,int,int)): Check new field.
Members:
ChangeLog:1.2942->1.2943
libraries/javalib/java/util/Calendar.java:1.27->1.28
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2942 kaffe/ChangeLog:1.2943
--- kaffe/ChangeLog:1.2942 Sun Oct 31 21:28:13 2004
+++ kaffe/ChangeLog Mon Nov 1 09:12:22 2004
@@ -1,3 +1,14 @@
+2004-11-01 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/java/util/Calendar.java:
+ Resynced with GNU Classpath.
+
+ 2004-10-31 Noa Resare <noa at resare.com>
+
+ * java/util/Calendar.java (explicitDSTOffset): New instance field.
+ (set(int,int)): Set and use new field.
+ (set(int,int,int)): Check new field.
+
2004-10-31 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/Klasses.jar.bootstrap:
Index: kaffe/libraries/javalib/java/util/Calendar.java
diff -u kaffe/libraries/javalib/java/util/Calendar.java:1.27 kaffe/libraries/javalib/java/util/Calendar.java:1.28
--- kaffe/libraries/javalib/java/util/Calendar.java:1.27 Sun Oct 24 17:20:11 2004
+++ kaffe/libraries/javalib/java/util/Calendar.java Mon Nov 1 09:12:26 2004
@@ -347,6 +347,13 @@
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>
@@ -650,10 +657,12 @@
case HOUR:
isSet[HOUR_OF_DAY] = false;
break;
+ case DST_OFFSET:
+ explicitDSTOffset = true;
}
// May have crossed over a DST boundary.
- if (field != DST_OFFSET && field != ZONE_OFFSET)
+ if (!explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET))
isSet[DST_OFFSET] = false;
}
@@ -676,7 +685,8 @@
isSet[DAY_OF_WEEK] = false;
isSet[DAY_OF_WEEK_IN_MONTH] = false;
- isSet[DST_OFFSET] = false; // May have crossed a DST boundary.
+ if (!explicitDSTOffset)
+ isSet[DST_OFFSET] = false; // May have crossed a DST boundary.
}
/**
More information about the kaffe
mailing list