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:
parent
c2c2c639af
commit
549502bcb2
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue