From be46171d02472fe1180e762290a2f42ff19e8028 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 1 Jan 2026 17:41:08 -0800 Subject: [PATCH] Turn of deprecation warning for wstring_convert. Deprecated in C++17, no replacement until C++26. --- libgnucash/engine/gnc-datetime.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgnucash/engine/gnc-datetime.cpp b/libgnucash/engine/gnc-datetime.cpp index cbacd3d2a3..c648a51d2d 100644 --- a/libgnucash/engine/gnc-datetime.cpp +++ b/libgnucash/engine/gnc-datetime.cpp @@ -535,11 +535,14 @@ constexpr size_t DATEBUFLEN = 100; static std::string win_date_format(std::string format, struct tm tm) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" wchar_t buf[DATEBUFLEN]; memset(buf, 0, DATEBUFLEN); std::wstring_convert, wchar_t> conv; auto numchars = wcsftime(buf, DATEBUFLEN - 1, conv.from_bytes(format).c_str(), &tm); return conv.to_bytes(buf); +#pragma GCC diagnostic pop } /* Microsoft's strftime uses the time zone flags differently from