From: Martin Willi Date: Tue, 11 Jun 2013 16:31:35 +0000 (+0200) Subject: unit-tests: enforce CET/CEST timezone to properly test non-UTC time formatting X-Git-Tag: 5.1.0dr1~97^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df76881f1176be6eada875f9a824e54ef0572d60;p=thirdparty%2Fstrongswan.git unit-tests: enforce CET/CEST timezone to properly test non-UTC time formatting --- diff --git a/src/libstrongswan/tests/test_utils.c b/src/libstrongswan/tests/test_utils.c index ec9baf1586..811882e538 100644 --- a/src/libstrongswan/tests/test_utils.c +++ b/src/libstrongswan/tests/test_utils.c @@ -18,6 +18,8 @@ #include #include +#include + /******************************************************************************* * object storage on lib */ @@ -391,6 +393,10 @@ Suite *utils_suite_create() Suite *s; TCase *tc; + /* force a timezone to match non-UTC conversions */ + setenv("TZ", "Europe/Zurich", 1); + tzset(); + s = suite_create("utils"); tc = tcase_create("objects");