mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 04:33:34 +08:00
don't try and handle case: timestamp + offset > 0
This commit is contained in:
@@ -1315,10 +1315,7 @@ int Logger::get_log_file_name(LogType type, char *file_name, size_t file_name_si
|
|||||||
|
|
||||||
// Check if time is non-zero for valid UTC timestamp
|
// Check if time is non-zero for valid UTC timestamp
|
||||||
if (timestamp_utc > 0) {
|
if (timestamp_utc > 0) {
|
||||||
int offset = _param_sdlog_utc_offset.get() * 60;
|
timestamp_utc += _param_sdlog_utc_offset.get() * 60;
|
||||||
if (timestamp_utc > abs(offset)) {
|
|
||||||
timestamp_utc += offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
tm tt = {};
|
tm tt = {};
|
||||||
gmtime_r(×tamp_utc, &tt);
|
gmtime_r(×tamp_utc, &tt);
|
||||||
|
|||||||
Reference in New Issue
Block a user