ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.22k stars 174 forks source link

Timezone support on SteamDeck (IANA TZ Database) #9112

Open mercuriete opened 1 year ago

mercuriete commented 1 year ago

Please describe your issue in as much detail as possible:

The SteamDeck is not prepared for timezones. I am a user from Canary Island ๐Ÿ‡ฎ๐Ÿ‡จ that is a timezone inside Spain ๐Ÿ‡ช๐Ÿ‡ธ. On linux you could use it with timedatectl. https://en.wikipedia.org/wiki/Tz_database

Steps for reproducing this issue:

  1. Go to desktop mode
  2. open konsole
  3. type "timedatectl set-timezone Atlantic/Canary"
  4. Go to gaming mode
  5. go to settings
  6. The gui is kind of broken because SteamDeck is not prepared for real timezones apart from UTC+N

Why this is important?

For example if you live in a region and that region change UTC offset by politics reason... you will end up with a bad time. In my case Atlantic/Canary it usually be "Europe/Madrid" - 1 and politically it is nothing to do with London. Another example. If in the future that region stop changing on winter to save electricity. Same problem happen. As an example "Atlantic/Canary" is WET on winter and WEST on summer but it could change for political reasons.

Expected behaviour

  1. open settings
  2. Go timezone
  3. select on the drop down "Atlantic/Canary"
  4. enjoy timezones
samueldr commented 1 year ago

I believe this would be the following bug that was reported and verified in Jovian NixOS (with Steam Deck interface).

Assuming that for the reporter that the time is fine at the top right, this issue is mostly cosmetic.

I've dug into the cause to see if somehow we were doing something wrong.

When a system time zone is not in the 62 time zones the Steam Deck front-end code knows about (SteamClient.Settings.GetAvailableTimeZones()), it will default to Pacific in the picker. And indeed, choosing one of the time zones from that list for timedatectl (or other mechanism) makes it show the correct time zone.

This could be solved by making the UI intrinsically use the time zone the system pretends exist as an added option in the picker. In other words, if it's not found, instead of defaulting to the pacific, add the current setting so it makes the picker neater.

This way, no need to add every time zones in the picker, the user can still use timedatectl on the Linux side to pick a preferred time zone, for the situations where it is desirable but rare.