-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add Support For Millisecond Timestamps #1850
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
Conversation
Missed the enterprise_audit_log tests, fixing... |
Codecov Report
@@ Coverage Diff @@
## master #1850 +/- ##
=======================================
Coverage 97.59% 97.59%
=======================================
Files 104 104
Lines 6615 6617 +2
=======================================
+ Hits 6456 6458 +2
Misses 86 86
Partials 73 73
Continue to review full report at Codecov.
|
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.
Thank you, @lindluni !
The GitHub Audit Log API introduced timestamps with millisecond granularity. We add support for these timestamps by first parsing the timestamp into a Unix timestamp and then checking to see if the generated timestamp is in the future. If the timestamp is in the future we re-parse it as a Unix timestamp in Milliseconds. Signed-off-by: Brett Logan <lindluni@github.com>
Signed-off-by: Brett Logan <lindluni@github.com>
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.
Thank you, @lindluni !
LGTM.
Awaiting second LGTM before merging.
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.
💙
Thank you, @wesleimp ! |
The GitHub Audit Log API introduced timestamps with millisecond granularity. We add support for these timestamps by first parsing the timestamp into a Unix timestamp and then checking to see if the generated timestamp is in the future. If the timestamp is in the future we re-parse it as a Unix timestamp in Milliseconds.
Tests were added to ensure that when the timestamp is 1 millisecond off that the granularity of the timestamp is preserved by milliseconds correctly being parsed.
Closes #1849
Signed-off-by: Brett Logan lindluni@github.com