Replaced all ACE_OS::localtime_r calls

This commit is contained in:
leak
2014-06-22 15:42:46 +02:00
parent ccf3374e49
commit 7dd6f0f1d8
10 changed files with 27 additions and 24 deletions

View File

@@ -21,7 +21,8 @@
std::string LogMessage::getTimeStr(time_t time)
{
tm aTm = localtime_r(time);
tm aTm;
localtime_r(&time, &aTm);
char buf[20];
snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
return std::string(buf);