From 70b4f15c646a825563ef08cab060a97fb40fe288 Mon Sep 17 00:00:00 2001 From: Pablo Largo Mohedano Date: Mon, 4 Nov 2024 10:07:37 +0100 Subject: [PATCH] According to Psalm, DateTimeImmutable::getTimezone() does not return `false` --- src/Psl/Clock/PsrClock.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Psl/Clock/PsrClock.php b/src/Psl/Clock/PsrClock.php index 48155e42..82d5e269 100644 --- a/src/Psl/Clock/PsrClock.php +++ b/src/Psl/Clock/PsrClock.php @@ -21,7 +21,6 @@ public function now(): DateTime\DateTimeInterface $timestamp = DateTime\Timestamp::fromParts($nativeDateTime->getTimestamp()); $timezone = $nativeDateTime->getTimezone(); - invariant($timezone !== false, 'Could not get the timezone object.'); $timezone = DateTime\Timezone::from($timezone->getName());