未验证 提交 daa3227c 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #3617 from ifreecoding/debug

局部变量tm_new未初始化,该结构体变量中的tm_isdst值为栈中残留值,不确定,该值会影响是否使用夏令时,最终表现概率性使用夏令时,…
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册