Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 14, 2016, 5:13:03 PM (9 years ago)
Author:
landauf
Message:

unfortunately std::put_time and std::get_time are only available in GCC 5+, so I have to revert this change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/util/StringUtils.cc

    r11111 r11114  
    506506        tm* pTime = std::localtime(&ctTime);
    507507        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;
    509515        return oss.str();
    510516    }
Note: See TracChangeset for help on using the changeset viewer.