Use wxDateTime::UNow() instead of time() and wxDateTime::Format() instead of
localtime() to make it possible to use "%l" specifier in wxLog time stamp.
Closes #13059.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67268
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Added wxStack<> template class.
- Added precision parameter to wxString::From[C]Double().
- Added wxThread::Wait() and Delete() "wait mode" parameter (Catalin Raceanu).
+- Allow showing milliseconds in wxLog time stamps (tan).
Unix:
#if wxUSE_DATETIME
if ( !ms_timestamp.empty() )
{
- wxChar buf[256];
- time_t timeNow;
- (void)time(&timeNow);
-
- struct tm tm;
- wxStrftime(buf, WXSIZEOF(buf),
- ms_timestamp, wxLocaltime_r(&timeNow, &tm));
-
- str->Empty();
- *str << buf << wxS(": ");
+ *str = wxDateTime::UNow().Format(ms_timestamp);
+ *str += wxS(": ");
}
#endif // wxUSE_DATETIME
}