• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openSUSE / agama / 7288508462 / 1 – rust
72%
master: 72%

Build:
DEFAULT BRANCH: master
Ran 21 Dec 2023 01:08PM UTC
Files 61
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Dec 2023 01:04PM UTC coverage: 40.973%. First build
rust – 7288508462.1

push

github

web-flow
Display most representative country in timezone selector (#946)

## Problems

Problem 1.

In the timezone selector the countries are only displayed if they are
part of the name of the timezone (eg. America/Argentina/Buenos_Aires).
In most cases, the name of the timezone includes only the global region
and a concrete city (eg. Europe/Madrid). That makes hard to find the
right timezone since the most intuitive mechanism (typing the name of
the user country in the search box) is usually useless.


![spain-old](https://github.com/openSUSE/agama/assets/3638289/e51c9eac-09ec-471e-af75-e03b4ba5a0e2)

Problem 2.

There are some duplicated or controversial timezones that are not
associated to any country. For more details [this
gist](https://gist.github.com/ancorgs/8bd5f42ea847e1ba7590bc7e3d54cdad).


![buenos_aires-old](https://github.com/openSUSE/agama/assets/3638289/b45e0dd2-4483-485b-b050-c8cac08a9b3c)

## Solution

Add the "most representative country" to each timezone and display that
in the UI. That information is read from the file
`/usr/share/zoneinfo/zone.tab`.

That makes it easier to find timezones.


![spain-new](https://github.com/openSUSE/agama/assets/3638289/cb4ecafc-303c-4c28-94d4-33570a6bfc5d)

Timezones without a country (except those that really make sense) are
filtered out. That removes controversy and duplicates.


![buenos_aires-new](https://github.com/openSUSE/agama/assets/3638289/4a221099-ec78-4626-8005-c76a42b1f1dd)

Works even for the two timezones that have a different identifier at
langtable and at `zone.tab`. Again, see the [previously mentioned
gist](https://gist.github.com/ancorgs/8bd5f42ea847e1ba7590bc7e3d54cdad).


![rangoon-new](https://github.com/openSUSE/agama/assets/3638289/8239362b-ae3b-4848-842f-98bbf8fad070)

## Testing

- Added new unit tests
- Tested manually (as shown in the screenshots)

1187 of 2897 relevant lines covered (40.97%)

1.2 hits per line

Source Files on job rust - 7288508462.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 7288508462
  • 20c3aa3d on github
  • Prev Job for on master (#7277578298.)
  • Next Job for on master (#7288910074.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc