1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

starttime in foldername

This commit is contained in:
Michael
2023-08-23 01:47:55 +02:00
committed by GitHub
parent 538acfe3c0
commit d2bbe0f35a
4 changed files with 20 additions and 6 deletions

View File

@ -15,6 +15,15 @@ namespace vstd
return s.str();
}
DLL_LINKAGE std::string getDateTimeISO8601Basic(std::time_t dt)
{
std::tm tm = *std::localtime(&dt);
std::stringstream s;
s.imbue(std::locale(""));
s << std::put_time(&tm, "%Y%m%dT%H%M%S");
return s.str();
}
}
VCMI_LIB_NAMESPACE_END