harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Lee <littlee1...@gmail.com>
Subject Re: [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 02:43:54 GMT
Is this similiar to HARMONY-6269 ?

On Wed, Oct 28, 2009 at 8:47 AM, Kyle Cho (JIRA) <jira@apache.org> wrote:

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


-- 
Yours sincerely,
Charles Lee

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message