summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index cd2a87ab2..946d08fc5 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -947,9 +947,14 @@ std::string timeToStr(const uint32_t time)
char buf[101];
const time_t tempTime = time;
tm *const timeInfo = localtime(&tempTime);
- // %c is locale-defined format
+ PRAGMA8(GCC diagnostic push)
+ PRAGMA8(GCC diagnostic ignored "-Wformat-y2k")
+ // %c is locale-defined format. gcc8 complains:
+ // '%c' yields only last 2 digits of year in some locales.
+ // However, mails *currently, on ML* expire in way less than a year.
if (strftime(&buf[0], 100, "%c", timeInfo) != 0U)
return std::string(buf);
+ PRAGMA8(GCC diagnostic pop)
return "unknown";
}