[MGNLUI-6074] Filter out deprecated timezones in EditUserProfile dialog Created: 24/Jul/20  Updated: 19/Mar/21  Resolved: 19/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Adam Siska Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
Relates
relates to MGNLUI-6086 DateField handles time zone from user... Closed
relation
is related to MGNLUI-6247 Make the LocaleSelectionSupport exten... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Migrate security app

 Description   

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.


Generated at Mon Feb 12 09:32:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.