Replaced all ACE_OS::localtime_r calls
This commit is contained in:
1 parent
ccf3374e49
commit
7dd6f0f1d8
10 files changed
+27
-24
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user