-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use dateutil in order to support parsing timestamps that include milliseconds #187
Comments
simonbaird
added a commit
to simonbaird/errata-tool
that referenced
this issue
Dec 6, 2019
This is a minimum viable patch to support the timestamp format change (possibly) coming in Errata Tool 3.20.9. I haven't tested it. Note that it is not backward compatible, so it would require Errata Tool 3.20.9 or higher. Note also that it's been suggested that we might change the timestamp format back to the old format in ET 3.20.9. If that happens then this patch must not be merged. Github: red-hat-storage#187 JIRA: ERRATA-9192
Jon has a WIP patch for Errata Tool to restore the old timestamp format, so I won't spend more time on this. |
Or use dateutil and not have to worry about trivial format changes, especially when you aren't using the time component. |
Great idea jorris. I'm going to re-title this to use |
ktdreyer
changed the title
Support parsing timestamps that include milliseconds
Use dateutil in order to support parsing timestamps that include milliseconds
Dec 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://projects.engineering.redhat.com/browse/ERRATA-9192 .
I believe just adding a '%f' to the format string is enough to get it working. You could consider trying to make it work with either format to make the transition easier, maybe with a wrapper function.
Question: Is there any particular reason why datetime.datetime.strptime is used in some places and time.strptime in others? Could it be made consistent for all the timestamp parsing?
Actually we might still change Errata Tool back to use the old format in the short term, which would mean this isn't needed.
The text was updated successfully, but these errors were encountered: