Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-49681

Time zones with same display names are not displayed in time zone selection dropdown

Details

    Description

      Currently the TimeZoneComparator class compares by time zone display name if the rawoffsets match. This causes a bug when there are two time zones which both have the same display name. The 'America/Denver' and 'US/Arizona' time zones both have the display name 'Mountain Standard Time', so when both are added to portal-ext.properties, only one will show because we use a TreeSet to store the time zones, and TreeSets don't allow duplicates.

      Steps to reproduce:
      1. Add the 'US/Arizona' time zone property along with all the other default time zone properties.
      2. Navigate to My Account > Display Settings, and click the drop down.
      Expected Results:
      There should be an Arizona time zone, and a Denver time zone (UTC -08:00 Mountain Standard Time and UTC -07:00 Mountain Daylight Time, respectively).
      Acutal Results:
      No time zone available for Arizona.

      To test time zone changes:
      1. Set user time zone in My Account > Display Settings to "Mountain Standard Time"
      2. Add blog entry
      3. Check time

      Attachments

        1. fixed.png
          fixed.png
          34 kB
        2. reproduced.png
          reproduced.png
          28 kB
        3. timezoneIsFixed.png
          timezoneIsFixed.png
          128 kB

        Issue Links

          Activity

            People

              joyce.wang Joyce Wang
              dustin.ryerson Dustin Ryerson (Inactive)
              Marta Elicegui Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8 years, 34 weeks, 6 days ago

                Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M2