X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55e5154d2cc5f994c34b128cd05fdc14f2c2fc43..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 88e715f800..c30b582075 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -676,16 +676,8 @@ void wxLog::TimeStamp(wxString *str) #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 } @@ -852,7 +844,7 @@ wxLogChain::wxLogChain(wxLog *logger) wxLogChain::~wxLogChain() { - delete m_logOld; + wxLog::SetActiveTarget(m_logOld); if ( m_logNew != this ) delete m_logNew;