-
lovetox
unix/linux is such a shitshow if you need anything from the system whats configured by distributions
-
Cynthia
> unix/linux is such a shitshow if you need anything from the system whats configured by distributions some platforms (steam, flatpak, etc.) solve that by running the game in a container✎ ↺ -
Cynthia
> unix/linux is such a shitshow if you need anything from the system whats configured by distributions some platforms (steam, flatpak, etc.) solve that by running the program in a container ✏ ↺
-
lovetox
i rather meant stuff like getting the current timezone
-
Cynthia
ah
-
lovetox
on Windows or MacOS thats one method call
-
lovetox
on Unix you better check 15 different file locations, then write a algo to merge the results
-
Cynthia
there is no consistent environment in linux distributions
-
Cynthia
not unless you ship your program in a container
-
Cynthia
or rely on a library/framework for everything
-
lovetox
for stuff like this also flatpak does not help, because you need something from the host, it can even break it, if it does not symlink the correct locations into the env
-
lovetox
i like what they try to do with portals, which is basically a universal API
-
Cynthia
i have my qualms about portal
-
Cynthia
like the lack of an API to request permission to access a file you know the path to✎ -
Cynthia
like the lack of an API to request permission to access a file you know the host path to ✏
-
Cynthia
which means if your program works with split files, you have to handle it in the most user-unfriendly way possible
-
lovetox
or store it inside your container
-
lovetox
you only need the permission if you want to escape the container
-
Cynthia
what if i'm packaging an emulator in a flatpak, and it works on BIN/CUE CD dump files
-
Cynthia
i emailed a emudev about this, and they stated this is why they don't use portals for choosing files
-
lovetox
im not arguing it cant be improved, if enough applications need this, they probably add more flexibility
-
Cynthia
yeah, but it's been an open issue in portal's github for years
-
lovetox
maybe i should add a issue to get the current timezone :D
-
singpolyma
python doesn't just have this in stdlib?
-
sunglocto
> python doesn't just have this in stdlib? `time`? ↺
-
lovetox
singpolyma, as every distribution does their own thing, it would be quite the maintenance burden
-
lovetox
so the answer is, No
-
singpolyma
you're looking for the named timezone?
-
lovetox
yes
-
moparisthebest
isn't it /etc/timezone always?
-
lovetox
https://github.com/regebro/tzlocal/blob/8f4f260846713f2086f16d74901edd7895794dcc/tzlocal/unix.py#L16
-
sunglocto
> isn't it /etc/timezone always? iirc not on all distros ↺
-
moparisthebest
what distro is that not true on
-
singpolyma
yeah getting the utc offset is easy but name is a whole thing
-
lovetox
favorite comment from that file
-
lovetox
``` # For some reason some distros are removing support for /etc/timezone, # which is bad, because that's the only place where the timezone is stated # in plain text, and what's worse, they don't delete it. So we can't trust # it now, so when we have conflicting configs, we just ignore it, with a warning. ```
-
lovetox
but yeah, maybe i try to read etc/timezone and the rest needs to put it in manually
-
detente
i don't have /etc/timezone here moparisthebest
-
moparisthebest
detente: what distro
-
detente
NixOS
-
Cynthia
> detente: what distro i don't have /etc/timezone here either ↺
-
Cynthia
and i'm running fedora atomic KDE
-
moparisthebest
ok so every normal distro then lol