mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
newlib: add missing tzset() to the time test
This commit is contained in:
parent
5a203a5371
commit
4770acf1cb
@ -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 New Issue
Block a user