Merge pull request #3617 from ifreecoding/debug
局部变量tm_new未初始化,该结构体变量中的tm_isdst值为栈中残留值,不确定,该值会影响是否使用夏令时,最终表现概率性使用夏令时,…
This commit is contained in:
commit
daa3227ca8
@ -40,7 +40,7 @@ static time_t get_rtc_timestamp(void)
|
||||
{
|
||||
RTC_TimeTypeDef RTC_TimeStruct = {0};
|
||||
RTC_DateTypeDef RTC_DateStruct = {0};
|
||||
struct tm tm_new;
|
||||
struct tm tm_new = {0};
|
||||
|
||||
HAL_RTC_GetTime(&RTC_Handler, &RTC_TimeStruct, RTC_FORMAT_BIN);
|
||||
HAL_RTC_GetDate(&RTC_Handler, &RTC_DateStruct, RTC_FORMAT_BIN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user