Use the NOW constant from eec7971

This commit is contained in:
Mike Colagrosso 2024-10-23 17:10:53 -06:00 committed by Alex Cabal
parent df8eac6f82
commit 65d1dcdd88
6 changed files with 6 additions and 21 deletions

View file

@ -8,8 +8,6 @@ class InvalidGitCommitCreatedDatetimeException extends AppException{
protected $message = 'Invalid GitCommit Created datetime.';
public function __construct(DateTimeImmutable $createdDatetime){
/** @throws void */
$now = new DateTimeImmutable();
$this->message = 'Invalid GitCommit Created datetime. ' . $createdDatetime->format('Y-m-d') . ' is after ' . $now->format('Y-m-d') . '.';
$this->message = 'Invalid GitCommit Created datetime. ' . $createdDatetime->format('Y-m-d') . ' is after ' . NOW->format('Y-m-d') . '.';
}
}