You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chen Shunfei (JIRA)" <ji...@apache.org> on 2007/10/08 10:09:50 UTC
[jira] Created: (HARMONY-4903)
[classlib][luni]Calendar.get(Calendar.DST_OFFSET) returns wrong value.
[classlib][luni]Calendar.get(Calendar.DST_OFFSET) returns wrong value.
----------------------------------------------------------------------
Key: HARMONY-4903
URL: https://issues.apache.org/jira/browse/HARMONY-4903
Project: Harmony
Issue Type: Bug
Components: Classlib
Environment: harmony-jre-579330
Windows
Reporter: Chen Shunfei
Priority: Minor
Here is the testCase:
import junit.framework.TestCase;
import java.util.Calendar;
import java.util.TimeZone;
public class TestDstOffset extends TestCase {
TimeZone timeZone;
Calendar cal;
public void setUp() {
timeZone = TimeZone.getTimeZone("America/Toronto");
cal = Calendar.getInstance(timeZone);
}
public void testDstOffset() {
cal.set(2006, Calendar.AUGUST, 1);
assertEquals(cal.get(Calendar.DST_OFFSET), 3600000);
}
public void testTimeInMillis() {
cal.clear();
cal.setTimeInMillis(119785146189L);
assertEquals(cal.get(Calendar.DST_OFFSET), 3600000);
}
public void testClear() {
cal.clear(Calendar.DST_OFFSET);
assertEquals(cal.get(Calendar.DST_OFFSET), 3600000);
}
public void testSetTimeInMills() {
cal.clear(Calendar.DST_OFFSET);
cal.set(Calendar.DST_OFFSET, 1800000);
cal.setTimeInMillis(119785146189L);
assertEquals(cal.get(Calendar.DST_OFFSET), 3600000);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.