diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index 08137f4056..5da029a608 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -412,7 +412,7 @@ bool get_log_time_tt(struct tm *tt, bool boot_time) { struct timespec ts; px4_clock_gettime(CLOCK_REALTIME, &ts); /* use RTC time for log file naming, e.g. /fs/microsd/2014-01-19/19_37_52.px4log */ - time_t utc_time_sec; + time_t utc_time_sec = 0; if (_gpstime_only && has_gps_3d_fix) { utc_time_sec = gps_time_sec;