Ticket #6246 (closed: fixed)
ExperimentInfo should use Run object start time call
Reported by: | Michael Reuter | Owned by: | Michael Reuter |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Karl Palmen |
Description
The ExperimentInfo::getWorkspaceStartDate function should use Run::startTime as this checks both the run_start and start_time properties. Not all files insert a run_start property.
Change History
comment:2 Changed 8 years ago by Michael Reuter
Refs #6246. Using Run::startTime call.
Changeset: 884d5e44751c40f245f9161991d6f0101e656cb6
comment:3 Changed 8 years ago by Michael Reuter
- Status changed from accepted to verify
- Resolution set to fixed
comment:4 Changed 8 years ago by Michael Reuter
Refs #6246. Using Run::startTime call.
Changeset: 884d5e44751c40f245f9161991d6f0101e656cb6
comment:5 Changed 8 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:6 Changed 8 years ago by Karl Palmen
- Status changed from verifying to closed
Looking at today's code from Master I see
//--------------------------------------------------------------------------------------- /** Return workspace start date as an ISO 8601 string. If this info not stored in workspace the * method returns current date. * * @return workspace start date as a string */ std::string ExperimentInfo::getWorkspaceStartDate() { std::string date; try { date = m_run->startTime().toISO8601String(); } catch (std::runtime_error &) { g_log.information("run_start/start_time not stored in workspace. Default to current date."); date = Kernel::DateAndTime::getCurrentTime().toISO8601String(); } return date; }
which does the startTime method of m_run, which according to the header file is a pointer to a Run object.
Note: See
TracTickets for help on using
tickets.