unit-tests: enforce CET/CEST timezone to properly test non-UTC time formatting
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
#include <library.h>
|
#include <library.h>
|
||||||
#include <utils/utils.h>
|
#include <utils/utils.h>
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* object storage on lib
|
* object storage on lib
|
||||||
*/
|
*/
|
||||||
@@ -391,6 +393,10 @@ Suite *utils_suite_create()
|
|||||||
Suite *s;
|
Suite *s;
|
||||||
TCase *tc;
|
TCase *tc;
|
||||||
|
|
||||||
|
/* force a timezone to match non-UTC conversions */
|
||||||
|
setenv("TZ", "Europe/Zurich", 1);
|
||||||
|
tzset();
|
||||||
|
|
||||||
s = suite_create("utils");
|
s = suite_create("utils");
|
||||||
|
|
||||||
tc = tcase_create("objects");
|
tc = tcase_create("objects");
|
||||||
|
|||||||
Reference in New Issue
Block a user