-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/etc/localtime symlink handling #26880
Comments
I'm reasonably sure this is an upstream ICU issue since Node.js itself doesn't directly read or manipulate /etc/localtime. ICU on the other hand does and in fact calls readlink() on many/most Unices. The logic is in deps/icu-small/source/common/putil.cpp. cc @srl295 |
Is there an easy way to reproduce? Maybe in a Docker container? |
ping @srl295 |
Definitely ICU. I've fixed a lot of this code, and nixos is what most of my linuxes run but with an explicit TZ. Let me try to repro. |
@mat8913 can you give me the relevant part of your nix config? |
$ nix-env -iA nixos.icu63
$ /nix/store/*-icu4c-63.1-dev/bin/icuinfo
…
<param name="tz.default">America/Los_Angeles</param>
… What do you get if you run the icuinfo command above? Is it correct? I don't see any relevant patches in https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/icu/base.nix |
If it's wrong above, then definitely file an issue at https://unicode-org.atlassian.net/ under for reference, i am on: Linux qrendi 5.4.42 #1-NixOS SMP Wed May 20 06:20:41 UTC 2020 x86_64 GNU/Linux |
@mat8913 if its helpful. the workaround would be to set |
@srl295 On NixOS, the problem occurs in The problem also occurs in flatpaks where Your suggested workaround of setting @targos Here's a Dockerfile to reproduce (well, I actually run it in podman but I think the syntax is the same):
Output on my computer is
|
@mat8913 sorry, been away/job change/etc.
This doesn't sound right. It should be an ID such as Australia/Sydney.
There's a rant in here somewhere.
The rant is this: tz files ought to be self identifying. See some concrete proposals by me in https://mm.icann.org/pipermail/tz/2017-February/024815.html The root cause within ICU is this:
The relevant ICU code is here: https://github.com/unicode-org/icu/blob/master/icu4c/source/common/putil.cpp#L702 Can you file an issue under https://unicode-org.atlassian.net/ and reference this one? I'm stepping back from ICU for a bit so I don't know when I will get to this, but ICU's PRs are open… |
@mat8913 and forgot to mention, thanks for a very clear reproducible case. 👍 👍 |
This comment was marked as spam.
This comment was marked as spam.
@Mhmoni25 are you able to try running Do you know how the multiple symlinks got there? It would be best to only use If someone wants to improve things here, the best course of action is to contribute to ICU. It looks like there's actually an ICU bug filed: ICU-21386. |
Mhmoni25's entire comment merely quotes mat8913 and adds nothing. It is similar to their comment at #42058 (comment). Their other comments across GitHub (such as mdn/browser-compat-data#14194 and dapphub/dappsys#63) are spam. They are now blocked from the organization. |
Good working tools |
Node has trouble figuring out the timezone if /etc/localtime is an indirect symlink. Here's some examples in the REPL
Even worse, in electron:
This is the cause of FreeTubeApp/FreeTube#233. It might also be the cause of ValveSoftware/steam-for-linux#5609 and flathub/im.riot.Riot#32.
The text was updated successfully, but these errors were encountered: