[MGNLUI-7089] Incorrect Timezone Labels Created: 11/Apr/22  Updated: 20/Jul/22  Resolved: 06/Jun/22

Status: Closed
Project: Magnolia UI
Component/s: user interaction
Affects Version/s: 6.2.17
Fix Version/s: 6.3.0, 6.2.20

Type: Bug Priority: Neutral
Reporter: Chris Jennings Assignee: Jaromir Sarf
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File timezones.png    
Issue Links:
Cloners
is cloned by ADMINCTR-89 Sort Timezone Labels Closed
Relates
dependency
depends upon ADMINCTR-1 Migrate user preferences dialog to ne... Closed
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-7167 Provide PR 6.2 Sub-task Completed Jaromir Sarf  
MGNLUI-7168 Code review Sub-task Completed Fernando Cherchi  
MGNLUI-7191 preintQA Sub-task Completed Quach Hao Thien  
MGNLUI-7198 QA Sub-task Completed Adam Siska  
MGNLUI-7202 Integrate Sub-task Completed Jaromir Sarf  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 11
Story Points: 3
Team: Nucleus

 Description   

Steps to reproduce

  1. In Admincentral, attempt to change your user preference to a new timezone.
  2. View the list of timezones presented as options, scrolling down to those beginning with GMT.

Expected results

  1. The list of timezones presented is clear and unambiguous.

Actual results

  1. The names given to the timezones do not match their descriptive labels. For example: GMT-11:00 (Etc/GMT+11)
  2. Should that be GMT-11:00 in both places or +11:00 in both places?


 Comments   
Comment by Quach Hao Thien [ 25/Apr/22 ]

The Timezone displays on the User Preference (or User Profile) in the format 

Timezone.getID() + Timezone.getDisplayName()

Timezone.getDisplayName() is a method returns a name in the specified style of this TimeZone suitable for presentation to the user in the specified locale (user locale), so that is about how Magnolia displays the Timezone.

Back to the concern of confusing of timezone label: GMT-11:00 (Etc/GMT+11), right here we have the GMT-11:00 is zoneId and the (Etc/GMT+11) is its display name. 

So let's say the UTC is the baseline (GMT+/-0 or Etc+/-0), and the GMT-11:00 in UTC mean that this timezone behinds 11 hours compare to UTC (offset 11:00) so it stays on the right of baseline, but the Etc/GMT+11 has it own way to state the number, when it's positive + means that the Timezone is on the right of UTC, and when it's negative, the Timezone is on the left. That means both the ID and its displayName state the same value but in different way.

 

  UTC  
GMT+11 GMT(+/-)0 GMT-11

~ equivalent to

  UTC  
Etc/GMT-11 Etc/GMT(+/-)0 Etc/GMT+11

Ref:

https://stackoverflow.com/questions/7303580/understanding-the-etc-gmt-time-zone

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

https://www.travelmath.com/time-zone/Etc/GMT-11

 

Hope this help

 

 

Comment by Mikaël Geljić [ 02/May/22 ]

Thanks for the pointers thien.quach! , in fact the SO answer summarizes it pretty well:

In most modern protocols I’ve seen, such as the ISO 8601, offsets ahead of UTC (towards the east) are positive, while offsets behind UTC (towards the west) are negative. So the offsets used by zones in the Americas have negative numbers such as America/Los_Angeles having an offset of -07:00 or -08:00 nowadays (varies during the year because of Daylight Saving Time (DST)).

Reviewing this ticket last week, we reckoned we should carry out a bit more improvement:

  • Remove the confusing Etc/GMT labels for "plain" general GMT time zones (which are rarely useful btw)
  • Display current UTC offset on each row, ideally towards the end (or right-aligned?)
  • Sort by offset, then by time zone display name
Comment by Jaromir Sarf [ 18/May/22 ]

Discovery:
Implement points from comment above. Where to start:

info.magnolia.ui.framework.util.TimezoneUtil#getTimeZoneInfo(TimeZone, Locale)
Generated at Mon Feb 12 09:43:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.