Fix test failure on Linux if tz database is not available
This commit is contained in:
parent
7380ff3551
commit
61caf66f1b
|
@ -448,7 +448,11 @@ void test_util_localtime_date(void) {
|
||||||
if (tz) {
|
if (tz) {
|
||||||
tz = strdup(tz);
|
tz = strdup(tz);
|
||||||
}
|
}
|
||||||
|
#ifdef __linux__
|
||||||
|
setenv("TZ", "NZST-12:00:00:00", 1);
|
||||||
|
#else // !__linux__
|
||||||
setenv("TZ", ":Pacific/Auckland", 1);
|
setenv("TZ", ":Pacific/Auckland", 1);
|
||||||
|
#endif // !__linux__
|
||||||
tzset();
|
tzset();
|
||||||
|
|
||||||
CU_ASSERT_STRING_EQUAL("02/Oct/2001:00:34:56 +1200",
|
CU_ASSERT_STRING_EQUAL("02/Oct/2001:00:34:56 +1200",
|
||||||
|
|
Loading…
Reference in New Issue