Commit 3fea1af
committed
utests - call tzset after setenv TZ
unit-tests can fail if run in an env where TZ is already set.
This is because utest.h setup calls setenv("TZ"), but does not call
tzset() immediately after that.
This causes tzname, timezone, and daylight global variables to by out of
sync from the newly set environment value of "TZ".
To fix this, explicitly call tzset().
It's unlikely that a program would call setenv("TZ") during it's
lifetime, and this should ideally only happen in a test env.1 parent 9d64cd6 commit 3fea1af
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
| 1329 | + | |
| 1330 | + | |
1329 | 1331 | | |
1330 | 1332 | | |
1331 | 1333 | | |
| |||
0 commit comments