harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4628) [classlib][Calendar] When timezone changed for calendar, corresponding HOUR_OF_DAY value does not change properly
Date Tue, 14 Aug 2007 08:03:30 GMT
[classlib][Calendar] When timezone changed for calendar, corresponding HOUR_OF_DAY value does
not change properly
-----------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4628
                 URL: https://issues.apache.org/jira/browse/HARMONY-4628
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: spark shen


The following test case will give different value on RI and Harmony:
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;

public class CalendarTest {

    public static void main(String[] args) {
        Calendar c = Calendar.getInstance(TimeZone.getTimeZone("Europe/London"),
                new Locale("zh", "CN"));
        System.out.println(c.get(Calendar.HOUR_OF_DAY));
        c.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
        System.out.println(c.get(Calendar.HOUR_OF_DAY));
    }
}

RI:
8
15
HY:
8
8

-- 
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