Function get localtime in binary built by nix work incorrectly #89487
Labels
0.kind: bug
Something is broken
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: non-nixos
Running packages on non-NixOS Linux
Describe the bug
Function get
localtime
in binary built by nix work incorrectlyTo Reproduce
Steps to reproduce the behavior:
I have written a simple project at https://github.com/thongpv87/nix-test . The code in
main.cpp
set theTZ
environment variable then call functionlocaltime
and print the timezone. Compile this file with g++, nix-build, g++ in docker image by dockerfile, docker image from dockerTools and run these binary/image and compare the result.My host system time zone is Singapore. The current time in Singapore when I run this is 23:48:40. The output when run with binary from nix-build is:
More output: https://pastebin.com/t8FAixyL
Expected behavior
Notify maintainers
Metadata
"x86_64-linux"
Linux 4.15.0-70-generic, Ubuntu, 16.04.6 LTS (Xenial Xerus)
no
yes
nix-env (Nix) 2.3.4
"nixpkgs-20.09pre213040.f77e057cda6"
"nixpkgs-20.09pre213040.f77e057cda6"
"home-manager, nixpkgs-20.09pre228165.00df2371122"
/home/tpham/.nix-defexpr/channels/nixpkgs
The text was updated successfully, but these errors were encountered: