We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a391557 + 810089c commit 93c1a57Copy full SHA for 93c1a57
Clock.php
@@ -46,14 +46,14 @@ public static function set(PsrClockInterface $clock): void
46
47
public function now(): \DateTimeImmutable
48
{
49
- $now = ($this->clock ?? self::$globalClock)->now();
+ $now = ($this->clock ?? self::get())->now();
50
51
return isset($this->timezone) ? $now->setTimezone($this->timezone) : $now;
52
}
53
54
public function sleep(float|int $seconds): void
55
56
- $clock = $this->clock ?? self::$globalClock;
+ $clock = $this->clock ?? self::get();
57
58
if ($clock instanceof ClockInterface) {
59
$clock->sleep($seconds);
0 commit comments