fix: Don't send I-D expiration warning if it will happen within 12 hours.#4700
Merged
Conversation
jennifer-richards
requested changes
Nov 5, 2022
jennifer-richards
left a comment
Member
There was a problem hiding this comment.
This is targeting main - would be nice to aim it at feat/tzaware instead. For either branch, replacing datetime.datetime.now() with timezone.now() as noted inline is preferable.
| return # don't warn about dead or inactive documents | ||
|
|
||
| expiration = doc.expires.date() | ||
| now_plus_12hours = datetime.datetime.now() + datetime.timedelta(hours=12) |
Member
There was a problem hiding this comment.
Should be timezone.now() instead of datetime.datetime.now()
Codecov Report
@@ Coverage Diff @@
## main #4700 +/- ##
==========================================
+ Coverage 88.51% 88.52% +0.01%
==========================================
Files 296 296
Lines 39840 39844 +4
==========================================
+ Hits 35263 35272 +9
+ Misses 4577 4572 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Member
|
I'll retarget this and make the changes to use timezone. |
rjsparks
marked this pull request as draft
November 6, 2022 12:29
rjsparks
marked this pull request as ready for review
November 8, 2022 12:59
jennifer-richards
approved these changes
Nov 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't send I-D expiration warning if it will happen within 12 hours.