Skip to content

Commit

Permalink
fix: incorrect time comparison for keyholder expiration
Browse files Browse the repository at this point in the history
Default argument is `now` which includes the current time. Changing it to
`today` makes the check correct as the decision is inclusive.
  • Loading branch information
tomudding committed Aug 31, 2024
1 parent 08dbbe8 commit 7b9654d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/Report/src/Model/Keyholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function setWithdrawnDate(?DateTime $withdrawnDate): void
*/
public function isCurrent(): bool
{
$now = new DateTime();
$now = new DateTime('today');

return $this->getExpirationDate() >= $now
&& (
Expand Down

0 comments on commit 7b9654d

Please sign in to comment.