Skip to content

timezone service: use /etc/zoneinfo instead of tzinfo directly#19449

Merged
edolstra merged 2 commits intoNixOS:masterfrom
abbradar:timedated
Oct 11, 2016
Merged

timezone service: use /etc/zoneinfo instead of tzinfo directly#19449
edolstra merged 2 commits intoNixOS:masterfrom
abbradar:timedated

Conversation

@abbradar
Copy link
Member

Motivation for this change

Partially fixes #19339. Also probably fixes some other uses of timezones in systemd. Needs NixOS/systemd#7 to fully fix the bug, but can be merged separately.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Tested in a VM with NixOS/systemd#7 applied to systemd. timedatectl now works properly.

@abbradar abbradar added 0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Oct 11, 2016
@mention-bot
Copy link

@abbradar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @cpages and @peti to be potential reviewers.

@edolstra
Copy link
Member

Note that this prevents services from being restarted automatically when tzdata changes. Probably not a big deal, but in general we should avoid that kind of impurity.

@abbradar
Copy link
Member Author

Oh, indeed. Well, for services I guess that's okay to depend on tzdata directly.

…irectly

This is needed so systemd can extract timezone from a symlink.
This is needed because now /etc/localtime symlink points there.
@abbradar
Copy link
Member Author

I've updated this to instead only link /etc/localtime via /etc/zoneinfo (I don't touch environment variables now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timedatectl status always reports UTC timezone

3 participants