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.
This commit is contained in:
Martin Willi 2014-04-02 12:29:32 +02:00
parent c2c2c639af
commit 549502bcb2
1 changed files with 4 additions and 0 deletions

View File

@ -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");