Changeset 11114
- Timestamp:
- Feb 14, 2016, 5:13:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/util/StringUtils.cc
r11111 r11114 506 506 tm* pTime = std::localtime(&ctTime); 507 507 std::ostringstream oss; 508 oss << std::put_time(pTime, "%m%d%Y_%H%M%S"); 508 // oss << std::put_time(pTime, "%m%d%Y_%H%M%S"); // <-- std::put_time is only available in GCC 5+ 509 oss << std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1) 510 << std::setw(2) << std::setfill('0') << pTime->tm_mday 511 << std::setw(2) << std::setfill('0') << (pTime->tm_year + 1900) 512 << "_" << std::setw(2) << std::setfill('0') << pTime->tm_hour 513 << std::setw(2) << std::setfill('0') << pTime->tm_min 514 << std::setw(2) << std::setfill('0') << pTime->tm_sec; 509 515 return oss.str(); 510 516 }
Note: See TracChangeset
for help on using the changeset viewer.