summaryrefslogtreecommitdiff
path: root/phone-app/src/Logs/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'phone-app/src/Logs/Utils.cpp')
-rw-r--r--phone-app/src/Logs/Utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/phone-app/src/Logs/Utils.cpp b/phone-app/src/Logs/Utils.cpp
index d57adec..6dabafa 100644
--- a/phone-app/src/Logs/Utils.cpp
+++ b/phone-app/src/Logs/Utils.cpp
@@ -54,7 +54,8 @@ std::string Logs::formatDate(time_t date)
std::string Logs::formatDuration(time_t duration)
{
char buffer[BUFFER_SIZE];
- strftime(buffer, sizeof(buffer), duration > ONE_HOUR ? "%H:%M:%S" : "%M:%S", gmtime(&duration));
+ struct tm tmp;
+ strftime(buffer, sizeof(buffer), duration > ONE_HOUR ? "%H:%M:%S" : "%M:%S", gmtime_r(&duration, &tmp));
return buffer;
}