Merge pull request #3617 from ifreecoding/debug

局部变量tm_new未初始化,该结构体变量中的tm_isdst值为栈中残留值,不确定,该值会影响是否使用夏令时,最终表现概率性使用夏令时,…
This commit is contained in:
Bernard Xiong 2020-05-22 18:25:36 +08:00 committed by GitHub
commit daa3227ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);