With CONFIG_LIBC_LOCALTIME enabled tm struct components were not getting calculated as flag was missing
Signed-off-by: Vidisha Thapa <thapa.v@samsung.com>
result->tm_hour = (int)hour;
result->tm_min = (int)min;
result->tm_sec = (int)sec;
-
-#if defined(CONFIG_TIME_EXTENDED)
+#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
result->tm_wday = clock_dayoftheweek(day, month, year);
result->tm_yday = day + clock_daysbeforemonth(result->tm_mon, clock_isleapyear(year));
result->tm_isdst = 0;