Skip to content

Commit

Permalink
strftime: avoid %F as it is not avaiable on wincross
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and alaaeddineelamri committed Aug 4, 2022
1 parent 6f5e168 commit aaa5f91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/lib/parse_conf.h
Expand Up @@ -423,7 +423,8 @@ static std::string TPAsString(const std::chrono::system_clock::time_point& tp)
{
std::time_t t = std::chrono::system_clock::to_time_t(tp);
char str[100];
if (!std::strftime(str, sizeof(str), "%F_%H:%M:%S", std::localtime(&t))) {
if (!std::strftime(str, sizeof(str), "%Y-%m-%d_%H:%M:%S",
std::localtime(&t))) {
return std::string("strftime error");
}
std::string ts = str;
Expand Down

0 comments on commit aaa5f91

Please sign in to comment.