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.

(cherry picked from commit f4daf6e0e7)
This commit is contained in:
Michał Kępień 2019-07-30 21:08:40 +02:00
parent 5159597db5
commit 8d0cdb54ee

View file

@ -38,7 +38,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);
@ -57,7 +57,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);
@ -93,7 +93,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);
@ -130,7 +130,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);
@ -165,7 +165,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);
@ -201,7 +201,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);