Ticket #6270 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

The run start time needs to have a precision of better than the nearest second

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: critical Milestone: Release 2.3.2
Component: Mantid Keywords: PatchCandidate,Released
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description

At the moment, the run_start/start_time property for a run is only stored to the nearest second (the truncation happens in LogManager::setStartAndEndTime). We need it to keep the original precision as our logs do so and this introduces an artificial offset.

Update the end time in the same way.

Change History

comment:1 Changed 8 years ago by Russell Taylor

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Russell Taylor

Re #6270. Improve precision of run_start/end workspace log values.

Previously the precision of these would be the nearest second as the setting went via the DateAndTime::toISO8601String() method, which truncated the time even if it had a better precision than that (as the SNS files do). This then caused some oddities when viewing logs because they do preserve the incoming precision.

DateAndTime::toISO8601String() now preserves the nanosecond precision of the underlying DateAndTime class.

Changeset: 0a2679ca5aa663ccc4d57663fd0f596dd0c5e115

comment:3 Changed 8 years ago by Russell Taylor

Re #6270. Improve precision of run_start/end workspace log values.

Previously the precision of these would be the nearest second as the setting went via the DateAndTime::toISO8601String() method, which truncated the time even if it had a better precision than that (as the SNS files do). This then caused some oddities when viewing logs because they do preserve the incoming precision.

DateAndTime::toISO8601String() now preserves the nanosecond precision of the underlying DateAndTime class.

Changeset: 0a2679ca5aa663ccc4d57663fd0f596dd0c5e115

comment:4 Changed 8 years ago by Russell Taylor

  • Keywords PatchCandidate added
  • Status changed from accepted to verify
  • Resolution set to fixed
  • Milestone changed from Release 2.4 to Release 2.3.2

Tester: Most existing data files don't provide a start time with precision better than a second anyway, though you should probably load a couple of those to check all's well. SNS pre-nexus files do, as you can see from the commit, as do ADARA files, of which the only one in the repository at present is HYSA_2411_monitors.nxs.h5 (use LoadNexusMonitors on it). To check these properties, load the files, show the logs and look at the start_time/end_time/run_start entries.

comment:5 Changed 8 years ago by Michael Reuter

This ticket has been cherry picked.

comment:6 Changed 8 years ago by Russell Taylor

Re #6270. Improve precision of run_start/end workspace log values.

Previously the precision of these would be the nearest second as the setting went via the DateAndTime::toISO8601String() method, which truncated the time even if it had a better precision than that (as the SNS files do). This then caused some oddities when viewing logs because they do preserve the incoming precision.

DateAndTime::toISO8601String() now preserves the nanosecond precision of the underlying DateAndTime class. (cherry picked from commit 0a2679ca5aa663ccc4d57663fd0f596dd0c5e115)

Changeset: 830f6b85a8bb704455b96c1f81a3f7e7cf78fb49

comment:7 Changed 8 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:8 Changed 8 years ago by Michael Reuter

  • Status changed from verifying to closed

This seems to be working correctly.

comment:9 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate,Released added; PatchCandidate removed

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7116

Note: See TracTickets for help on using tickets.