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

tzupdate: timezone is not available on your operating system #127984

Open
DavHau opened this issue Jun 24, 2021 · 4 comments
Open

tzupdate: timezone is not available on your operating system #127984

DavHau opened this issue Jun 24, 2021 · 4 comments
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@DavHau
Copy link
Member

DavHau commented Jun 24, 2021

Describe the bug
When I use tzupdate to update my time zone, it will always throws and error like this:

Traceback (most recent call last):
  File "/nix/store/5gzd9y9i5kd3y7g1l0m4addf7zmkzjqr-tzupdate-2.0.0/bin/.tzupdate-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/5gzd9y9i5kd3y7g1l0m4addf7zmkzjqr-tzupdate-2.0.0/lib/python3.8/site-packages/tzupdate.py", line 289, in main
    link_localtime(timezone, args.zoneinfo_path, args.localtime_path)
  File "/nix/store/5gzd9y9i5kd3y7g1l0m4addf7zmkzjqr-tzupdate-2.0.0/lib/python3.8/site-packages/tzupdate.py", line 170, in link_localtime
    raise TimezoneNotLocallyAvailableError(
tzupdate.TimezoneNotLocallyAvailableError: Timezone "Europe/Berlin" requested, but this timezone is not available on your operating system.

Notify maintainers

@michaelpj

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

 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.122, NixOS, 20.09.4331.686720050c3 (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4pre20210519_af4ff64`
 - channels(root): `"home-manager-20.09, nixos-20.09.4331.686720050c3, nixos-20.03-20.03.3328.6d1a044fc9f, nixos-hardware, unstable-21.11pre295280.fa0326ce523"`
 - channels(grmpf): `"nixos-19.09-19.09.2522.75f4ba05c63, nixos-20.03-20.03.3101.0d0660fde3b, nixos-20.09-20.09beta992.7badbf18c45"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - tzupdate
# a list of nixos modules affected by the problem
module:
@Artturin
Copy link
Member

@DavHau
Copy link
Member Author

DavHau commented Jun 26, 2021

Thanks, I didn't know about the service. Honestly I think this is not a good user experience.
The service is basically just a wrapper to make the package work under nixos.
It would be better if the package would just work under nixos by default.
The package could be patched/wrapped directly and the service wouldn't be needed anymore, reducing potential confusion.

@Artturin
Copy link
Member

sure but people would be confused about why it doesn't work and probably reports "permission denied" because they have time.timeZone set

    # We need to have imperative time zone management for this to work.
    # This will give users an error if they have set an explicit time
    # zone, which is better than silently overriding it.
    time.timeZone = null;

@stale
Copy link

stale bot commented Jan 9, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

2 participants