newlib: add missing tzset() to the time test

This commit is contained in:
Ivan Grokhotkov 2019-03-29 12:38:06 +08:00
parent 5a203a5371
commit 4770acf1cb

View file

@ -65,6 +65,7 @@ TEST_CASE("test time functions", "[newlib]")
{
time_t now = 1464248488;
setenv("TZ", "UTC-8", 1);
tzset();
struct tm *tm_utc = gmtime(&now);
TEST_ASSERT_EQUAL( 28, tm_utc->tm_sec);
TEST_ASSERT_EQUAL( 41, tm_utc->tm_min);