From 19cbdb0f50da65dc775175834624ebfe34fb0539 Mon Sep 17 00:00:00 2001 From: Julien Mercier-Rojas Date: Thu, 10 Dec 2020 22:58:00 +0100 Subject: [PATCH] Add timezone to now() --- src/Infrastructure/System/Clock.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/System/Clock.php b/src/Infrastructure/System/Clock.php index 5f7edf3..169d204 100644 --- a/src/Infrastructure/System/Clock.php +++ b/src/Infrastructure/System/Clock.php @@ -8,6 +8,7 @@ namespace JeckelLab\Contract\Infrastructure\System; use DateTimeImmutable; +use DateTimeZone; /** * Interface Clock @@ -16,7 +17,8 @@ interface Clock { /** + * @param DateTimeZone|null $timezone * @return DateTimeImmutable */ - public function now(): DateTimeImmutable; + public function now(?DateTimeZone $timezone = null): DateTimeImmutable; }