diff --git a/firmware/hw_layer/rtc_helper.cpp b/firmware/hw_layer/rtc_helper.cpp index 36be1f2234..87355e5679 100644 --- a/firmware/hw_layer/rtc_helper.cpp +++ b/firmware/hw_layer/rtc_helper.cpp @@ -55,8 +55,8 @@ static void SetTimeUnixSec(time_t unix_time) { canary = localtime_r(&unix_time, &tim); osalDbgCheck(&tim == canary); #else - struct tm *t = localtime(&tv_sec); - memcpy(&timp, t, sizeof(struct tm)); + struct tm *t = localtime(&unix_time); + memcpy(&tim, t, sizeof(struct tm)); #endif rtcConvertStructTmToDateTime(&tim, 0, ×pec);