summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils/stringutils.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 0b4e4180a..171ef6ceb 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -663,12 +663,9 @@ bool strStartWith(const std::string &str1, const std::string &str2)
std::string getDateString()
{
char buffer[80];
-
time_t rawtime;
- struct tm *timeinfo;
-
time(&rawtime);
- timeinfo = localtime(&rawtime);
+ const tm *const timeinfo = localtime(&rawtime);
strftime(buffer, 79, "%Y-%m-%d", timeinfo);
return std::string(buffer);