mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Fix RTC local time formatting (timezone offset) when no valid d… (#8731)
Fix RTC local time formatting (timezone offset) when no valid date/time
This commit is contained in:
commit
cbe8749d69
2 changed files with 5 additions and 4 deletions
|
@ -200,7 +200,8 @@ bool dateTimeFormatUTC(char *buf, dateTime_t *dt)
|
||||||
|
|
||||||
bool dateTimeFormatLocal(char *buf, dateTime_t *dt)
|
bool dateTimeFormatLocal(char *buf, dateTime_t *dt)
|
||||||
{
|
{
|
||||||
return dateTimeFormat(buf, dt, timeConfig()->tz_offsetMinutes, false);
|
const int16_t timezoneOffset = rtcIsDateTimeValid(dt) ? timeConfig()->tz_offsetMinutes : 0;
|
||||||
|
return dateTimeFormat(buf, dt, timezoneOffset, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dateTimeFormatLocalShort(char *buf, dateTime_t *dt)
|
bool dateTimeFormatLocalShort(char *buf, dateTime_t *dt)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue