X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f4a0c5be34be837210768501c13dbcff81e533c..678d9f2a42faa84cf934bbb75a5b4414a094012e:/src/common/time.cpp diff --git a/src/common/time.cpp b/src/common/time.cpp index 71ad2fac3a..e97789f43c 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -36,7 +36,7 @@ seconds since January 1, 1901, GMT. #include "wx/ioswrap.h" -#if wxUSE_IOSTREAMH +#if wxUSE_IOSTREAMH && wxUSE_STD_IOSTREAM #include #else #include @@ -319,7 +319,7 @@ wxTime wxTime::Min(const wxTime& t) const } #ifndef __SALFORDC__ -wxTime::operator char *(void) +wxTime::operator wxChar *(void) { return FormatTime(); } @@ -332,8 +332,8 @@ void wxTime::SetFormat(const wxTime::tFormat lFormat, wxTime::Precision = lPrecision; } -char *wxTime::FormatTime() const { - static char timeBuf[30]; +wxChar *wxTime::FormatTime() const { + static wxChar timeBuf[30]; unsigned hh(GetHour()); switch (Format) { @@ -346,18 +346,18 @@ char *wxTime::FormatTime() const { switch (Precision) { case wxStdMinSec: - sprintf(timeBuf,"%2d:%02d:%02d",hh,GetMinute(),GetSecond()); + wxSprintf(timeBuf,_T("%2d:%02d:%02d"),hh,GetMinute(),GetSecond()); break; case wxStdMin: - sprintf(timeBuf,"%2d:%02d",hh,GetMinute()); + wxSprintf(timeBuf,_T("%2d:%02d"),hh,GetMinute()); break; } if (Format == wx12h) if (GetHour() <= 12) - strcat(timeBuf,_("am")); + wxStrcat(timeBuf,_("am")); else - strcat(timeBuf,_("pm")); + wxStrcat(timeBuf,_("pm")); return timeBuf; }