harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle Cho (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6363) [classlib][icu4j] simple date format in UTC seems to work differently than IBM and Sun JDK
Date Wed, 28 Oct 2009 00:47:59 GMT
[classlib][icu4j] simple date format in UTC seems to work differently than IBM and Sun JDK
------------------------------------------------------------------------------------------

                 Key: HARMONY-6363
                 URL: https://issues.apache.org/jira/browse/HARMONY-6363
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M11
         Environment: X86/Redhat EL 5
            Reporter: Kyle Cho
            Priority: Minor


class dateformat2 {
        public static void main(String args[]) throws Exception
        {
                java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("EEE MMM dd
HH:mm:ss zzz yyyy");
                java.util.TimeZone tz = java.util.TimeZone.getTimeZone("UTC");
                sdf.setTimeZone(tz);
                java.util.Date d = sdf.parse("Wed Oct 28 03:45:42 UTC 2009");
                String s = sdf.format(d);
                System.out.println(s);
        }
}

With above test case,
Harmony DRL prints:
Wed Oct 28 03:45:42 GMT+00:00 2009

IBM and Sun JDK print:
Wed Oct 28 03:45:42 UTC 2009


I understand that UTC and GMT+00:00 are equivalent.
However when app sets timezone id to "UTC" and wants to display time format with "UTC", why
does Harmony display in "GMT+00:00" format? It seems icu4j(one of dependencies) does not properly
handle this case.

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