harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Yu" <junjie0...@gmail.com>
Subject [classlib][luni]Date.getTimezoneOffset return wrong value
Date Fri, 25 Apr 2008 10:03:15 GMT
Hi, all,

I looked at this issue from the JIRA[1]. The testcase works fine on RI but
fails on Harmony in the second assert statement.
I found that the returned TimeZone instance from
TimeZone.getTimeZone("America/Toronto") on Harmony was "GMT" other than
"America/Toronto". That's why the second assert statement fails on Harmony.
I attached a patch to the JIRA[1], which will solve
this issue. Anybody to verify it? If no objection, I will ask a committer to
apply it: )

import java.util.TimeZone;
import java.util.Date;
import junit.framework.TestCase;
public class TestGetTimezoneOffset extends TestCase {
 public void testGetTimezoneOffset() {
  Date date = new Date(07,2,24);
  date = new Date(99,8,1);
[1] https://issues.apache.org/jira/browse/HARMONY-4904

Best Regards,
Jim Yu (虞俊杰)

China Software Development Lab, IBM
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message