harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5459) [classlib][util] default TimeZone ignores raw offset after switch to ICU.
Date Tue, 05 Feb 2008 16:40:08 GMT
[classlib][util] default TimeZone ignores raw offset after switch to ICU.
-------------------------------------------------------------------------

                 Key: HARMONY-5459
                 URL: https://issues.apache.org/jira/browse/HARMONY-5459
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: All
            Reporter: Pavel Pervov


The following test fails on Harmony but passes on RI.

------------------
import java.util.TimeZone;

class TimeZoneTest {
    public static void main(String[] args) {
	    TimeZone tz1 = (TimeZone)TimeZone.getDefault();
	    System.out.println(tz1);
	    int fourHours = 4*60*60*1000;
	    tz1.setRawOffset(fourHours);
	    System.out.println(tz1);
	    if(tz1.getOffset(1, 2000, 01, 1, 7, 0) == fourHours) {
	        System.out.println("PASSED");
	    } else {
	        System.out.println("FAILED: rawOffset is ignored");
	    }
    }
}
------------------

I'll attach simple patch to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message