diff --git a/src/Livewire/Concerns/RemembersQueries.php b/src/Livewire/Concerns/RemembersQueries.php index 90a2e7bb..c8df172d 100644 --- a/src/Livewire/Concerns/RemembersQueries.php +++ b/src/Livewire/Concerns/RemembersQueries.php @@ -20,7 +20,7 @@ trait RemembersQueries public function remember(callable $query, string $key = '', DateTimeInterface|DateInterval|Closure|int|null $ttl = 5): array { return App::make(CacheStoreResolver::class)->store()->remember('laravel:pulse:'.static::class.':'.$key.':'.$this->period, $ttl, function () use ($query) { - $start = CarbonImmutable::now()->toDateTimeString(); + $start = CarbonImmutable::now('UTC')->toDateTimeString(); [$value, $duration] = Benchmark::value(fn () => $query($this->periodAsInterval())); diff --git a/tests/Feature/Livewire/RemembersQueriesTest.php b/tests/Feature/Livewire/RemembersQueriesTest.php new file mode 100644 index 00000000..fe6b4868 --- /dev/null +++ b/tests/Feature/Livewire/RemembersQueriesTest.php @@ -0,0 +1,15 @@ + false, 'disableHighlighting' => true]) + ->assertSeeHtml(<<<'HTML' + Run at: ${formatDate('2000-01-01 13:00:00')} + HTML); +});