Skip to content
Snippets Groups Projects
Commit 3cce002f authored by Sam Jenkins's avatar Sam Jenkins
Browse files

Re #23103 updated Icat3Helper based on review

parent ffa4e829
No related branches found
No related tags found
No related merge requests found
...@@ -190,16 +190,16 @@ void CICatHelper::saveInvestigationIncludesResponse( ...@@ -190,16 +190,16 @@ void CICatHelper::saveInvestigationIncludesResponse(
savetoTableWorkspace((*datafile_citr)->location, t); savetoTableWorkspace((*datafile_citr)->location, t);
// File creation Time. // File creation Time.
std::unique_ptr<std::string> creationtime = nullptr; if ((*datafile_citr)->datafileCreateTime) {
if ((*datafile_citr)->datafileCreateTime != nullptr) { const static std::string format("%Y-%b-%d %H:%M:%S");
time_t crtime = *(*datafile_citr)->datafileCreateTime; std::string creationTime;
char temp[25]; creationTime.resize(format.size());
strftime(temp, 25, "%Y-%b-%d %H:%M:%S", localtime(&crtime)); const time_t crtime = *(*datafile_citr)->datafileCreateTime;
std::string ftime(temp); strftime(const_cast<char *>(creationTime.data()), creationTime.size(),format.data(),
creationtime = std::make_unique<std::string>(); localtime(&crtime));
creationtime->assign(ftime); savetoTableWorkspace(creationTime.data(), t);
} }
savetoTableWorkspace(creationtime.get(), t);
// //
savetoTableWorkspace((*datafile_citr)->id, t); savetoTableWorkspace((*datafile_citr)->id, t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment