Skip to content

Plexon .pl2 files fail to load if it is recorded in January; files from other months have month created off-by-one #1371

@cheydrick

Description

@cheydrick

Describe the bug
Plexon .pl2 files fail to load if they are recorded in January. File recorded in other months will have the month created be stored off-by-one.

.pl2 files store the date created according to the tm structure found in time.h: https://cplusplus.com/reference/ctime/tm/

The month in the tm struct is encoded as 0-11, but the Python DateTime object expects the month to be from 1-12. A ValueError exception is thrown when trying to load a .pl2 file recorded in January.

To Reproduce
To reproduce, try to load a .pl2 file recorded in January.
JanuaryRecording.zip

Environment:

  • OS: Windows 11
  • Python version 3.9.5
  • Neo version 0.13.0.dev0
  • NumPy version 1.22.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions