Ticket #6246 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

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:1 Changed 8 years ago by Michael Reuter

  • Status changed from new to accepted

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.

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7092

Note: See TracTickets for help on using tickets.