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:
@@ -701,7 +701,11 @@ Suite *utils_suite_create()
|
|||||||
TCase *tc;
|
TCase *tc;
|
||||||
|
|
||||||
/* force a timezone to match non-UTC conversions */
|
/* force a timezone to match non-UTC conversions */
|
||||||
|
#ifdef WIN32
|
||||||
|
_putenv("TZ=GST-1GDT");
|
||||||
|
#else
|
||||||
setenv("TZ", "Europe/Zurich", 1);
|
setenv("TZ", "Europe/Zurich", 1);
|
||||||
|
#endif
|
||||||
tzset();
|
tzset();
|
||||||
|
|
||||||
s = suite_create("utils");
|
s = suite_create("utils");
|
||||||
|
|||||||
Reference in New Issue
Block a user