-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: io.timestamp2datetime does not work for some edgecase dates #585
Comments
ehennestad
added a commit
that referenced
this issue
Sep 3, 2024
Some dates are assigned wrongly when Day, Month and Year are set individually, as the datetime object internally/silently adjusts month if day is not valid
3 tasks
bendichter
pushed a commit
that referenced
this issue
Sep 10, 2024
* Fix bug in io.timestamp2datetime (Issue #585) Some dates are assigned wrongly when Day, Month and Year are set individually, as the datetime object internally/silently adjusts month if day is not valid * Update timestamp2datetime.m Fix: Should not preallocate datetimeArray as it is not known beforehand whether the timestamp has a timezone or not (datetime.empty contrains to datetime w/o timezone) * Create testTimestampToDatetime.m Add unit test for io.timestamp2datetime function
ehennestad
added a commit
that referenced
this issue
Sep 10, 2024
bendichter
added a commit
that referenced
this issue
Sep 12, 2024
* Improve coverage for nwbRead/nwbExport * Remove tutorialTest (function-based) * Create TutorialTest (class-based unit test) * Add test classes (issue #583 ) * Update description for PynwbTutorialTest * Add specific tests for io.timestamp2datetime * Update unit tests * Create getTutorialNwbFilePath.m Add function to create a filepath for saving tutorial nwb files in a fixed folder * Fix: Add starting_time when creating TimeSeries objects (#584) Also, use misc.getTutorialNwbFilePath to create a filepath for saving tutorial nwb file * Update several tutorials: Specify timezone or NWBFile's session_start_time property * Fix bug in io.timestamp2datetime (Issue #585) Some dates are assigned wrongly when Day, Month and Year are set individually, as the datetime object internally/silently adjusts month if day is not valid * Update timestamp2datetime.m Fix: Should not preallocate datetimeArray as it is not known beforehand whether the timestamp has a timezone or not (datetime.empty contrains to datetime w/o timezone) * Update GenerationTest.m Ensure test can be run from any current working directory, not just the matnwb repo folder * Update getMatnwbDir.m Simplyfy function by using mfilename instead of dbstack * Delete file which was introduced with issue #585 * Change nwbtest: Add selector options as input; Add cleanup routine * Add test for constructing Anon with name, value input * Add specific testing of types.untyped.Set When writing test, also discovered a but in types.untyped.Set which is fixed * Remove function call used for debugging --------- Co-authored-by: Ben Dichter <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
For some dates that come at the end of a month, the io.timestamp2datetime function returns the wrong date in the output.
Steps to Reproduce
Error Message
No response
Operating System
macOS
Matlab Version
MATLAB Version: 23.2.0.2365128 (R2023b)
Code of Conduct
The text was updated successfully, but these errors were encountered: