c0dcefa7ba
We have changed to a Glibc based toolchain recently [1] but the
behavior of TZ handling is not the same between libc implementation
when no Zone Database is installed.
musl and uClibc-ng return "UTC" when the data file of the requested
time zone is missing or when TZ is not set.
# TZ=America/Los_Angeles date +%Z
UTC
# TZ= date +%Z
UTC
Glibc return all or part of TZ content or "Universal" if TZ is empty.
# TZ=America/Los_Angeles date +%Z
America
# TZ= date +%Z
Universal
As demonstrated by TestAllTimezone, Glibc return "PDT" when the
America/Los_Angeles time zone data file is installed:
# TZ=America/Los_Angeles date +%Z
PDT
Since the Glibc behavior seems weird (not a bug [2]) when TZ is
set but the time zone data file is missing, update our test
to check against a string defined in the Glibc code [3].
[1]
|
||
---|---|---|
.. | ||
br2-external/detect-bad-arch | ||
cpeid-br2-external | ||
rootfs-overlay1 | ||
rootfs-overlay2/etc | ||
test_selinux | ||
__init__.py | ||
device_table2.txt | ||
post-build.sh | ||
post-fakeroot.sh | ||
post-image.sh | ||
squashfs-xattr-kernel.config | ||
test_bad_arch.py | ||
test_cpeid.py | ||
test_file_capabilities.py | ||
test_hardening.py | ||
test_post_scripts.py | ||
test_root_password.py | ||
test_rootfs_overlay.py | ||
test_selinux.py | ||
test_timezone.py |