newlib: add missing tzset() to the time test
This commit is contained in:
parent
5a203a5371
commit
4770acf1cb
1 changed files with 1 additions and 0 deletions
|
@ -65,6 +65,7 @@ TEST_CASE("test time functions", "[newlib]")
|
||||||
{
|
{
|
||||||
time_t now = 1464248488;
|
time_t now = 1464248488;
|
||||||
setenv("TZ", "UTC-8", 1);
|
setenv("TZ", "UTC-8", 1);
|
||||||
|
tzset();
|
||||||
struct tm *tm_utc = gmtime(&now);
|
struct tm *tm_utc = gmtime(&now);
|
||||||
TEST_ASSERT_EQUAL( 28, tm_utc->tm_sec);
|
TEST_ASSERT_EQUAL( 28, tm_utc->tm_sec);
|
||||||
TEST_ASSERT_EQUAL( 41, tm_utc->tm_min);
|
TEST_ASSERT_EQUAL( 41, tm_utc->tm_min);
|
||||||
|
|
Loading…
Reference in a new issue