[kaffe] DateFormatTest regression
Ito Kazumitsu
ito.kazumitsu at hitachi-cable.co.jp
Wed Mar 3 18:06:02 PST 2004
In message "Re: [kaffe] DateFormatTest regression"
on 04/03/04, Ito Kazumitsu <ito.kazumitsu at hitachi-cable.co.jp> writes:
> As for WET, java/util/TimeZone.java reads
>
> tz = new SimpleTimeZone
> (0 * 3600, "WET",
> Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600,
> Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600);
>
> This means WET's daylight saving time should start on the last
> Sunday in March. But now that DST_BUG occurs before the last
> Sundy, there may be another bug about the handling of
> DAY_OF_WEEK_IN_MONTH. I call this this bug DOWIM_BUG afterwards.
This part in java/util/SimpleTimeZone.java seems to have something
to do with DOWIM_BUG.
public void setStartRule(int month, int day, int dayOfWeek, int time)
{
this.startMode = checkRule(month, day, dayOfWeek);
this.startMonth = month;
// FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations
// of this method.
this.startDay = Math.abs(day);
this.startDayOfWeek = Math.abs(dayOfWeek);
this.startTime = time;
useDaylight = true;
}
public void setEndRule(int month, int day, int dayOfWeek, int time)
{
this.endMode = checkRule(month, day, dayOfWeek);
this.endMonth = month;
// FIXME: XXX: JDK 1.2 allows negative values and has 2 new variations
// of this method.
this.endDay = Math.abs(day);
this.endDayOfWeek = Math.abs(dayOfWeek);
this.endTime = time;
useDaylight = true;
}
More information about the kaffe
mailing list