Skip to content

Commit

Permalink
Merge pull request #9 from Jeckel-Lab/feature/add-timezone-to-clock-c…
Browse files Browse the repository at this point in the history
…ontract

Add timezone to now()
  • Loading branch information
jeckel committed Dec 10, 2020
2 parents f5ab9ad + 19cbdb0 commit b08f6cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Infrastructure/System/Clock.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace JeckelLab\Contract\Infrastructure\System;

use DateTimeImmutable;
use DateTimeZone;

/**
* Interface Clock
Expand All @@ -16,7 +17,8 @@
interface Clock
{
/**
* @param DateTimeZone|null $timezone
* @return DateTimeImmutable
*/
public function now(): DateTimeImmutable;
public function now(?DateTimeZone $timezone = null): DateTimeImmutable;
}

0 comments on commit b08f6cc

Please sign in to comment.