Skip to content

Commit

Permalink
Fixed calendar stub
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed May 23, 2020
1 parent 820d266 commit 9267619
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Ocelot/Calendar/Gregorian/GregorianCalendarStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public function day(): Day

public function now(): DateTime
{
return DateTime::fromDateTime(new \DateTimeImmutable('now', new \DateTimeZone('UTC')));
return DateTime::fromDateTime(
$this->currentDate
? $this->currentDate
: new \DateTimeImmutable('now', new \DateTimeZone('UTC'))
);
}

public function yesterday() : DateTime
Expand Down

0 comments on commit 9267619

Please sign in to comment.