Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6074

Filter out deprecated timezones in EditUserProfile dialog

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None

      In the user preferences we have a lot of timezones to choose from. Regarding wiki page https://en.wikipedia.org/wiki/List_of_tz_database_time_zones some of them are deprecated, some of them are aliases/links. Now the output of TimeZone.getAvailableIDs() is taken without further modification (see TimeZoneFieldFactory.java:120).
      There is a possible way of filtering out some of the zones described here: https://stackoverflow.com/a/60132784 or here https://stackoverflow.com/questions/1694885/timezones-in-java

      The final solution could be further discussed, but we should not have deprecated zones as an option at least.

      NOTE:
      if the field with options would be filterable, there is probably no reason to pre-filter timezones like this.

      DEV NOTE:
      some timezones are not recognized through ZoneId.of() thus not working even in the old ui (i.e. saving incorrect values without warning), here is a list of these:
      EST, HST, MST, ACT, AET, AGT, ART, AST, BET, BST, CAT, CNT, CST, CTT, EAT, ECT, IET, IST, JST, MIT, NET, PLT, PNT, PRT, PST, SST, VST.
      There is new ZoneId::getAvailableZoneIds to use instead of TimeZone::getAvailableIDs, anyway there is also java.time.ZoneId#SHORT_IDS mapping available.

        Acceptance criteria

              Unassigned Unassigned
              asiska Adam Siska
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD