Introduce method in TimeZone to provide modern identifier name

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      Currently in java.util.TimeZone a user can call TimeZone.getAvailableIDs() which returns 600+ identifiers at the moment. Although all the results are technically valid, the results contain the deprecated 3-letter Java identifiers, as well as historical tzdb identifiers that exist for compatibility reasons, which are ultimately mapped to a modern identifier. For example, 'Japan' is mapped to 'Asia/Tokyo' (Pre-1993 naming conventions), 'Mexico/General' is mapped to 'America/Mexico_City' (Pre-2013 practice), etc.

      For users without compatibility concerns, they should be encouraged to use modern tzdb identifiers in their applications.

      This issue proposes adding the static method getModernIdentifier(String ID) which takes an identifier, and returns the modern equivalent if applicable, otherwise it returns the input ID.

            Assignee:
            Justin Lu
            Reporter:
            Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: