Skip to content

Commit

Permalink
Fix struct tm init
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogs9 committed Mar 19, 2024
1 parent b24c5ca commit 2bd5f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 2bd5f11

Please sign in to comment.