From 3000d826ad4938bf9132bf2312cee1c7d03836b9 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 29 Nov 2022 14:31:25 +1000 Subject: replace date formats, fix crash diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 64168b5..9f873b0 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -281,7 +281,14 @@ wxString wxCallStrftime(const wxString& format, const tm* tm) // http://sourceforge.net/tracker/?func=detail&atid=102435&aid=1046059&group_id=2435 wxString s; +#ifdef __HAIKU__ + wxString _format = format; + _format.Replace(wxT("%x"),wxT("%D")); + _format.Replace(wxT("%X"),wxT("%T")); + if ( !wxStrftime(buf, WXSIZEOF(buf), _format, tm) ) +#else if ( !wxStrftime(buf, WXSIZEOF(buf), format, tm) ) +#endif { // There is one special case in which strftime() can return 0 without // indicating an error: "%p" may give empty string depending on the -- 2.37.3