diff options
Diffstat (limited to 'src/utils.cpp')
-rw-r--r-- | src/utils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils.cpp b/src/utils.cpp index be3cfd3..7a922fe 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -536,8 +536,9 @@ void printEnsemble(const shared_ptr<dabEnsemble>& ensemble) if (ensemble->lto_auto) { time_t now = time(nullptr); - struct tm* ltime = localtime(&now); - time_t now2 = timegm(ltime); + struct tm ltime; + localtime_r(&now, <ime); + time_t now2 = timegm(<ime); etiLog.log(info, " lto: %2.1f hours", 0.5 * (now2 - now) / 1800); } else { |