From 2bd5f11f81d947ad7e3f9c6bc6f09acf14381616 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Tue, 19 Mar 2024 07:48:48 +0100 Subject: [PATCH] Fix struct tm init --- src/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time.c b/src/time.c index 882c9d98..68540daf 100644 --- a/src/time.c +++ b/src/time.c @@ -72,7 +72,7 @@ rcutils_time_point_value_as_date_string( } time_t now_t = (time_t)(seconds); - struct tm ptm = {.tm_year = 0, .tm_mday = 0}; + struct tm ptm; #ifdef _WIN32 if (localtime_s(&ptm, &now_t) != 0) { RCUTILS_SET_ERROR_MSG("failed to get localtime");