GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
ephem seems to be ignoring the microseconds in the builtin datetime objects. I've pasted three examples below. The first two should not give identical output. In the third, I convert to a string first and this seems to work fine.
>>> import ephem
>>> import datetime
>>> ephem.date(datetime.datetime(2000, 12, 25, 12, 41, 16, 10))
>>> ephem.date(datetime.datetime(2000, 12, 25, 12, 41, 16, 10000))
>>> ephem.date(str(datetime.datetime(2000, 12, 25, 12, 41, 16, 10000)))
Fix GitHub #29 by using datetime microseconds
I think I have fixed it — could you run the following install command to try out this new version and let me know if it works?
pip install https://github.com/brandon-rhodes/pyephem/archive/master.zip
Yup that did the trick!
How long will it take to propagate this to pypi? Will you be incrementing the minor version number for this fix (so my module can check for the fix at runtime)?
Add a CHANGELOG link to GitHub issue #29
The fix has now been released as 22.214.171.124. Enjoy!