pynwb icon indicating copy to clipboard operation
pynwb copied to clipboard

Update file_create_date on write

Open rly opened this issue 6 years ago • 0 comments

Feature Request

Opening an NWB file in any mode except 'r' should add an entry with the current date and time to NWBFile.file_create_date. It would be better if this could be changed only upon modification to the file, but with how h5py works, this does not appear to be trackable. (One could just do dataset[()] = some new data without calling io.write).

If this is not doable, I suggest 1) changing the documentation and 2) changing the variable type from array of datetimes to a single datetime.

Problem/Use Case

NWBFile.file_create_date is intended to store a record of the date and time an NWB file was created and all subsequent modifications made. But this is currently set to a list containing one element - the creation date. The list is never subsequently changed.

Checklist

  • [x] Have you ensured the feature or change was not already reported ?
  • [x] Have you included a brief and descriptive title?
  • [x] Have you included a clear description of the problem you are trying to solve?
  • [x] Have you included a minimal code snippet that reproduces the issue you are encountering?
  • [x] Have you checked our Contributing document?

rly avatar Jul 01 '19 21:07 rly