-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Fix computing Timestamps in Ruby #1099
Conversation
I'd like this to be merged so we can make a release and show correct summaries with |
Aside from using ISO 8601 rather then seconds since the epoch I don't see a better way to do this. I also think that sub millisecond precision is pointless. |
I agree and don't think anyone will have use of nanoseconds anyway. I think we've inherited that from the default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code style / feel are all good. I've never used Timestamp
personally, but it seems fairly self descriptive.
Summary
This should provide a fix for cucumber-ruby#1438
Basically, the timestamps generated by
cucumber-messages
are wrong (the way we used theTime.to_r
does not really correspond to a seconds/nanos division).This solution is not perfect as there are slight discrepencies during the conversion, less that 1e6 seconds that said, once again, slight).
I'll try to fix that too before merging.
Details
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: