]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not use legacy time zone names
authorMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)
committerMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 20:22:28 +0000 (22:22 +0200)
"PST8PDT" is a legacy time zone name whose use in modern code is
discouraged.  It so happens that using this time zone with musl libc
time functions results in different output than for other libc
implementations, which breaks the lib/isc/tests/time_test unit test.
Use the "America/Los_Angeles" time zone instead in order to get
consistent output across all tested libc implementations.

(cherry picked from commit f4daf6e0e7d4f347242392fbf3d585707c831b5a)

lib/isc/tests/time_test.c

index 5ff41ce441a9d3d616f836bbbc0b737b9b1cfa4d..f9b03d571c234a2b9d97e5ddcb9ec61733d4742e 100644 (file)
@@ -39,7 +39,7 @@ isc_time_parsehttptimestamp_test(void **state) {
 
        UNUSED(state);
 
-       setenv("TZ", "PST8PDT", 1);
+       setenv("TZ", "America/Los_Angeles", 1);
        result = isc_time_now(&t);
        assert_int_equal(result, ISC_R_SUCCESS);