harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r620129 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/util/SimpleTimeZone.java test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java
Date Sat, 09 Feb 2008 14:41:02 GMT
Author: tonywu
Date: Sat Feb  9 06:41:01 2008
New Revision: 620129

URL: http://svn.apache.org/viewvc?rev=620129&view=rev
Log:
Fix HARMONY-5459 ([classlib][util] default TimeZone ignores raw offset after switch to ICU)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java?rev=620129&r1=620128&r2=620129&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java
Sat Feb  9 06:41:01 2008
@@ -585,6 +585,7 @@
     @Override
     public void setRawOffset(int offset) {
         rawOffset = offset;
+        icuTZ.setRawOffset(offset);
     }
 
     private void setStartMode() {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java?rev=620129&r1=620128&r2=620129&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/SimpleTimeZoneTest.java
Sat Feb  9 06:41:01 2008
@@ -198,6 +198,13 @@
         assertEquals("Incorrect offset returned", -(5 * 60 * 60 * 1000), st1
                 .getOffset(GregorianCalendar.AD, 1998, Calendar.JUNE, 11,
                         Calendar.THURSDAY, 0));
+        
+        // Regression for HARMONY-5459
+        st1 = (TimeZone)TimeZone.getDefault(); 
+        int fourHours = 4*60*60*1000; 
+        st1.setRawOffset(fourHours); 
+        assertEquals(fourHours, st1.getOffset(1, 2099, 01, 1, 5, 0));
+
 	}
 
 	/**



Mime
View raw message