]> git.ipfire.org Git - thirdparty/bind9.git/commit
Call tzset() after setenv("TZ", ...) in unit tests 9543/head
authorMichal Nowak <mnowak@isc.org>
Thu, 14 May 2026 12:28:06 +0000 (12:28 +0000)
committerMichal Nowak <mnowak@isc.org>
Tue, 26 May 2026 13:52:59 +0000 (15:52 +0200)
commitc14f7881f232e3dfb4180843dc2672a15d3bbfa6
tree6157967e0d41fcd0762d42a91731c1ffa1507b8a
parent27babd5fa9fc04c3d3c9f5d6ad0c9cd7b487cade
Call tzset() after setenv("TZ", ...) in unit tests

POSIX does not require localtime_r() to behave as if tzset() was called,
so the TZ environment change isn't picked up if some library has already
primed libc's tz cache.  Loading pkcs11-provider during OpenSSL init
does exactly that, causing the time and dnstap cmocka tests to format
timestamps in UTC instead of the requested zone.

Assisted-by: Claude:claude-opus-4-7
tests/dns/dnstap_test.c
tests/dns/update_test.c
tests/isc/time_test.c