classpath
[Top][All Lists]
Advanced

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

TimeZone


From: Jeroen Frijters
Subject: TimeZone
Date: Mon, 6 Sep 2004 17:13:15 +0200

Hi,

I'm not sure, but I think with the recent time zone changes there was a
bug introduced. Does the patch below make sense?

Regards,
Jeroen

Index: java/util/TimeZone.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/TimeZone.java,v
retrieving revision 1.25
diff -u -r1.25 TimeZone.java
--- java/util/TimeZone.java     31 Aug 2004 21:06:48 -0000      1.25
+++ java/util/TimeZone.java     6 Sep 2004 15:12:13 -0000
@@ -884,7 +884,7 @@
        // Offset could be in hours or seconds.  Convert to millis.
        // The offset is given as the time to add to local time to get
GMT
        // we need the time to add to GMT to get localtime.
-       if (gmtOffset < 24)
+       if (Math.abs(gmtOffset) < 24)
          gmtOffset *= 60 * 60;
        gmtOffset *= -1000;
       }




reply via email to

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