aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-04-02 12:29:32 +0200
committerMartin Willi <martin@revosec.ch>2014-06-04 15:53:11 +0200
commit549502bcb20ed6a91fc7afaaaa9e23f382d56632 (patch)
tree9b82a016bc073de7553b2de102d1447df39e5322 /src
parentc2c2c639afbae4e7ddb90d10cfa9a25734d3d283 (diff)
downloadstrongswan-549502bcb20ed6a91fc7afaaaa9e23f382d56632.tar.bz2
strongswan-549502bcb20ed6a91fc7afaaaa9e23f382d56632.tar.xz
unit-tests: Force a CET/CEST timezone Windows understands
As it is currently unclear what the "three-letter-timezone" for CEST is, we use the German timezone, which actually is CET/CEST. SetEnvironmentVariable() "TZ" does not seem to affect localtime(), so we use _putenv() instead.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/tests/suites/test_utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstrongswan/tests/suites/test_utils.c b/src/libstrongswan/tests/suites/test_utils.c
index 1a2f74c04..abca4620e 100644
--- a/src/libstrongswan/tests/suites/test_utils.c
+++ b/src/libstrongswan/tests/suites/test_utils.c
@@ -701,7 +701,11 @@ Suite *utils_suite_create()
TCase *tc;
/* force a timezone to match non-UTC conversions */
+#ifdef WIN32
+ _putenv("TZ=GST-1GDT");
+#else
setenv("TZ", "Europe/Zurich", 1);
+#endif
tzset();
s = suite_create("utils");