Merge pull request #3228 from eduar-hte/asctime-multithread

Replace usage of std::ctime, which is not safe in multithread contexts
This commit is contained in:
Ervin Hegedus
2024-08-14 14:55:53 +02:00
committed by GitHub
12 changed files with 60 additions and 69 deletions

View File

@@ -65,12 +65,12 @@ MultipartPartTmpFile::~MultipartPartTmpFile() {
}
void MultipartPartTmpFile::Open() {
struct tm timeinfo;
time_t tt = time(NULL);
time_t tt = time(nullptr);
struct tm timeinfo;
localtime_r(&tt, &timeinfo);
char tstr[17];
char tstr[std::size("/yyyymmdd-hhmmss")];
strftime(tstr, std::size(tstr), "/%Y%m%d-%H%M%S", &timeinfo);
std::string path = m_transaction->m_rules->m_uploadDirectory.m_value;