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



      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


        1. fixed.png
          34 kB
          Joyce Wang
        2. reproduced.png
          28 kB
          Joyce Wang
        3. timezoneIsFixed.png
          128 kB
          Dustin Ryerson

        Issue Links



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


                8 years, 8 weeks, 1 day ago


                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M2