From f4daf6e0e7d4f347242392fbf3d585707c831b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 30 Jul 2019 21:08:40 +0200 Subject: [PATCH] Do not use legacy time zone names "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. --- lib/isc/tests/time_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/isc/tests/time_test.c b/lib/isc/tests/time_test.c index 122997c8b8..6bc19c9178 100644 --- a/lib/isc/tests/time_test.c +++ b/lib/isc/tests/time_test.c @@ -36,7 +36,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); @@ -55,7 +55,7 @@ isc_time_formatISO8601_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); @@ -91,7 +91,7 @@ isc_time_formatISO8601ms_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); @@ -128,7 +128,7 @@ isc_time_formatISO8601L_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); @@ -163,7 +163,7 @@ isc_time_formatISO8601Lms_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); @@ -199,7 +199,7 @@ isc_time_formatshorttimestamp_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);