Rounding error in datetime conversion
I think I found a slight rounding error in the function absolutedate_to_datetime() (in pyhelpers.py). The error is only of one millisecond but caused some sanity checks in the code I am using to fail, which can be quite annoying.
For instance, when converting 31.526168 seconds to seconds and microseconds, the function returns 31 seconds and 526167 micreseconds (because in Python, 31.526168 - 31 = 31.52616799999… and the function truncates the decimal part instead of rounding it off)
A suggestion would be to replace line 121 of pyhelpers.py :
microseconds = int(1000000.0 * (seconds - math.floor(seconds)))
by something like that :
microseconds = round(1e6*(second - int(second)))
Best regards