1
0
Fork 0

Avoid crash on tests with no TZ set

This commit is contained in:
James Turner 2021-07-21 10:58:27 +01:00
parent 80816a205b
commit 12f18b325b

View file

@ -613,6 +613,10 @@ void TimeManager::updateLocalTime()
void TimeManager::updateLocalTimeString()
{
time_t cur_time = _impl->get_cur_time();
if (!_impl->get_zonename()) {
return;
}
struct tm* aircraftLocalTime = fgLocaltime(&cur_time, _impl->get_zonename());
static char buf[16];
snprintf(buf, 16, "%.2d:%.2d:%.2d",