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

[classlib][util] wrong daylight savings are reported for "MST" and "EST" timezones after locale data unification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • None
    • 5.0M5
    • Classlib
    • None
    • All
    • Novice

    Description

      The following test passes on RI but fails on Harmony:
      ------------------------
      import java.util.TimeZone;
      import java.util.Date;

      class TimeZoneIsDaylight {
      static Date d = new Date(101, 7, 20);
      static boolean isDaylight(String s)

      { return TimeZone.getTimeZone(s).inDaylightTime(d); }

      static void checkDaylight(String s, boolean yes)

      { System.out.println(s + ": " + (isDaylight(s) == yes ? "PASSED" : "FAILED")); }

      public static void main(String[] args)

      { System.out.println(d); checkDaylight("MST", true); checkDaylight("EST", true); }

      }
      ------------------------

      The difference is in start month of daylight savings. RI reports it to be March, 8th for both, we think it is April, 1st.

      I'll attach the patch right now.

      Attachments

        1. H5461.patch
          1 kB
          Pavel Pervov

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: