Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5468

[classlib][util] java.util.Date.toString outputs real time zone name on RI, but prints GMT<+/-offset> on Harmony.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0M8
    • Classlib
    • None
    • All

    Description

      The fllowing test demonstrates the behaviour:
      --------------------------
      import java.util.TimeZone;
      import java.util.Date;

      class DateToString {
      public static void main(String[] args)

      { TimeZone tz = TimeZone.getDefault(); tz.setDefault(tz.getTimeZone("MST")); System.out.println(new Date(104, 2, 13)); }

      }
      --------------------------
      It looks like the problem may be in ICU's SimpleTimeZone pattern processing code.

      Attachments

        1. HARMONY-5468.diff
          4 kB
          Jim Yu
        2. HARMONY-5468V2.diff
          3 kB
          Jim Yu
        3. HARMONY-5468V3.diff
          3 kB
          Jim Yu

        Issue Links

          Activity

            People

              tony.wu Tony Wu
              mcfirst Pavel Pervov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: