tests: Remove GCC compatibility from make_tm

We're using C++17, GCC only started implementing that in version 5, so there's
no need for compatibility code for older versions any more.
This commit is contained in:
Julian Brost 2025-04-25 16:17:28 +02:00
parent de4b58a04f
commit 2458f686db

View File

@ -23,13 +23,8 @@ tm make_tm(std::string s)
}
std::tm t = {};
#if defined(__GNUC__) && __GNUC__ < 5
// GCC did not implement std::get_time() until version 5
strptime(s.c_str(), "%Y-%m-%d %H:%M:%S", &t);
#else /* defined(__GNUC__) && __GNUC__ < 5 */
std::istringstream stream(s);
stream >> std::get_time(&t, "%Y-%m-%d %H:%M:%S");
#endif /* defined(__GNUC__) && __GNUC__ < 5 */
t.tm_isdst = dst;
return t;