classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Re: SimpleTimeZone.getOffset() fix


From: Mark Wielaard
Subject: [cp-patches] Re: SimpleTimeZone.getOffset() fix
Date: Sun, 20 Feb 2005 22:15:27 +0100

Hi,

On Sun, 2005-02-20 at 22:00 +0100, Sven de Marothy wrote:
> On Sun, 2005-02-20 at 18:20 +0100, Mark Wielaard wrote:
> > Thanks to Audrius for walking me through the code and Mauve test I think
> > we found the cause of some of the remaining mauve failures with
> > SimpleTimeZone. We store the endTime internally as local time (so
> > including the dst offset), but getOffset() takes the millis as offset
> > into the day in standard time. This doesn't matter for the start time
> > (since that is given already in standard time), but does matter for the
> > end time.
> > 
> > 2005-02-20  Mark Wielaard  <address@hidden>
> > 
> >         * java/util/SimpleTimeZone.java (getOffset): Calculate beforeEnd by
> >         taking dstSavings into account.
>
> My turn to ask:
> No attachement of inline diff for this change?
> :)

Oops. Here you go:

diff -u -r1.24 SimpleTimeZone.java
--- java/util/SimpleTimeZone.java       17 Feb 2005 22:42:42 -0000      1.24
+++ java/util/SimpleTimeZone.java       20 Feb 2005 21:12:49 -0000
@@ -693,7 +693,8 @@
        boolean afterStart = ! isBefore(year, month, day, dayOfWeek, millis,
                                        startMode, startMonth, startDay,
                                        startDayOfWeek, startTime);
-       boolean beforeEnd = isBefore(year, month, day, dayOfWeek, millis,
+       boolean beforeEnd = isBefore(year, month, day, dayOfWeek,
+                                    millis + dstSavings,
                                     endMode, endMonth, endDay, endDayOfWeek,
                                     endTime);


Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]