Skip to content

Conversation

@alexrockhill
Copy link
Contributor

Fixes issue related to mne-tools/mne-bids#280.

Windows throws an error when datetime.fromtimestamp is less than 0. This is the case for dates before 1970 Jan 1. I suspect that the way mne.io.meas_info._stamp_to_dt uses datetime.fromtimestamp will fail on a Windows OS. I am not by a windows machine and so cannot confirm but if the tests for windows fail, then I will fix it by using datetime.fromtimestamp(0) and then adding the argument that was being passed to fromtimestamp to timedelta. Basically, instead of reading from a timestamp, the number that was to be read from a timestamp will be used to move the time back stamp number of seconds.

@codecov
Copy link

codecov bot commented Nov 8, 2019

Codecov Report

Merging #7036 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #7036      +/-   ##
==========================================
- Coverage    89.7%   89.64%   -0.07%     
==========================================
  Files         438      438              
  Lines       77467    77472       +5     
  Branches    12580    12580              
==========================================
- Hits        69491    69447      -44     
- Misses       5164     5211      +47     
- Partials     2812     2814       +2

@alexrockhill alexrockhill changed the title testing reading old data [BUG] testing reading old data Nov 8, 2019
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for merge from me

@bloyl can you look and see if you're happy?

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to format this: Enclose it in double backticks to render it as code (won't generate a crossref link). But ask yourself why an end user needs to know exactly which internal private function was changed here. Maybe it's enough to just say "behavior X changed to support situation Y".

@agramfort agramfort merged commit fb98a50 into mne-tools:master Nov 9, 2019
@agramfort
Copy link
Member

thx @alexrockhill

@alexrockhill alexrockhill deleted the test_read_old branch November 9, 2019 14:53
larsoner pushed a commit to larsoner/mne-python that referenced this pull request Dec 5, 2019
* testing reading old data

* failed as expected, fixing

* added to changelog

* added my name

* deleted reference to private function in docs

* more latest changes, probably wrong but I don't know how to reference a private function

* small doc changes
agramfort pushed a commit that referenced this pull request Dec 5, 2019
* FIX: Allow unknown

* DOC: whats_new

* FIX: sklearn import

* FIX: More

* FIX: Fix for latest NumPy

* [BUG] testing reading old data (#7036)

* testing reading old data

* failed as expected, fixing

* added to changelog

* added my name

* deleted reference to private function in docs

* more latest changes, probably wrong but I don't know how to reference a private function

* small doc changes

* FIX: Rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants