Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MSEED: 1 microsecond rounding issue #1697
I did not manage to reproduce locally as the test was not reproducible as it used the current timestamp. I guess it was some kind of rounding issue with the new nanoseconds UTCDateTime that by chance manifested in that test run. I replaced the current timestamp with a hardcoded time of the test failure. If this works it should be good enough.
Mar 6, 2017
8 of 9 checks passed
Hmm.. strange.. still think this might be a rounding issue edge case, maybe in combination with floating point accuracy of the timestamp?
The timestamp you coded in the test is only down to microseconds.. but in the test execution (the one that failed and was reported) it likely had more accuracy that was cut off? Dunno, didn't look into the new UTCDateTime details fully yet..
# Random date that previously failed. dt = UTCDateTime(2017, 3, 6, 4, 12, 16, 260696) self.assertEqual(dt, util._convert_mstime_to_datetime( util._convert_datetime_to_mstime(dt)))