Skip to content
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

Firefox changed the way the timeZone is returned #247105

Closed
mawis opened this issue Aug 4, 2023 · 2 comments
Closed

Firefox changed the way the timeZone is returned #247105

mawis opened this issue Aug 4, 2023 · 2 comments

Comments

@mawis
Copy link
Contributor

mawis commented Aug 4, 2023

Describe the bug

Since I updated to NixOS 23.05 I noticed, that several Elm programmed sites were broken in Firefox. I finally now had the time to dig deeper in that and I found the underlying problem: The way the timezone is returned by Firefox has changed with NixOS 23.05. When running the command Intl.DateTimeFormat().resolvedOptions().timeZone in the Firefox console, up until NixOS 22.11 the returned value on my system was Europe/Berlin, but with NixOS 23.05 it's no just CET.

I checked with Firefox on Ubuntu, MacOS and Windows. All still return Europe/Berlin in the current version of Firefox, so I think the problem has been introduced by NixOS and not by Firefox.

This change breaks the (at least) the timezone-data package of the Elm ecosystem, as it is now returning a TimeZone.error instead of a Time.Zone.

BTW: chromium on NixOS is still returning the expected value of Europe/Berlin on my system.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open Firefox
  2. Open the tools for web developers (Ctrl-Shift-I)
  3. Execute the following expression: Intl.DateTimeFormat().resolvedOptions().timeZone

Expected behavior

Firefox should return the timezone as Europe/Berlin as it does on other platforms and as chromium does as well.

Screenshots

Result on NixOS 23.05/Firefox 115 is:

grafik

Result on Windows 10 is:

grafik

Notify maintainers

@lovesegfault @Hexa

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.41, NixOS, 23.05 (Stoat), 23.05.2385.48e82fe1b1c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos-23.05, old-22.05, unstable"`
 - channels(matthias): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@bobby285271
Copy link
Member

Maybe this is #238025?

@mawis
Copy link
Contributor Author

mawis commented Aug 4, 2023

Thanks @bobby285271

I first thought it's different, as I do get a timezone (and not UTC). But setting the TZ environment variable fixed my problem as well, so I guess it's a duplicate. Thanks for pointing out.

@mawis mawis closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants