[haiku-bugs] [Haiku] #15907: bug: can't set Spain, Portugal nor Ecuador timezones under Time

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 26 Apr 2020 11:09:00 -0000

#15907: bug: can't set Spain, Portugal nor Ecuador timezones under Time
-------------------------------------+-----------------------------
 Reporter:  Morgul                   |       Owner:  nobody
     Type:  bug                      |      Status:  new
 Priority:  high                     |   Milestone:
Component:  Preferences/Time & Date  |     Version:  R1/Development
 Keywords:                           |  Blocked By:
 Blocking:                           |    Platform:  All
-------------------------------------+-----------------------------
 Under Time application, on the latest git and nightly versions, it's
 impossible to set any of the Spain timezones, nor the ordinary timezones
 for Portugal an Ecuador.

 What happens is those timezones when selected have their button either
 disabled or not working, and the time preview section shows no timezone
 and no time either.

 I found the cause and wrote a clean fix for it.

 The issue comes from the code that "flattens" countries with exactly one
 timezone subitem, so they appear on the list as a single item. That code
 would force taking the timezone from the parent, even when it had no
 timezone, therefore overriding the only good timezone those aforementioned
 country items had, on the sibling.

 I changed it to only take the parent timezone if the parent actually has a
 timezone, therefore leaving the timezone from the sibling otherwise,
 whether it has one or not (if neither parent nor sibling had a timezone,
 it wouldn't work anyway, as that code couldn't guess a totally non-
 specified timezone).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15907>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: