Update daily_file_sink.h

solve compiler problem: not supported std::put_time() under version 5
pull/2993/head
Aaron Konishi 2 years ago committed by GitHub
parent 696db97f67
commit e01a7d756f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,7 +53,13 @@ struct daily_filename_format_calculator {
#else
std::stringstream stream;
#endif
#if __GNUC__ >= 5
stream << std::put_time(&now_tm, file_path.c_str());
#else
char time_buf[64];
std::strftime(time_buf, sizeof(time_buf), file_path.c_str(), &now_tm);
stream << time_buf;
#endif
return stream.str();
}
};

Loading…
Cancel
Save