From c3ea5447e7c25335455802caefd183ebb7257fef Mon Sep 17 00:00:00 2001 From: Roscoe Date: Wed, 1 Apr 2026 00:14:44 +0100 Subject: [PATCH] Fix timezone --- app/View/Components/Layout.php | 7 ++++--- config/app.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/View/Components/Layout.php b/app/View/Components/Layout.php index 282f7ae..216d272 100644 --- a/app/View/Components/Layout.php +++ b/app/View/Components/Layout.php @@ -4,6 +4,7 @@ use Closure; use DateTime; +use DateTimeZone; use Illuminate\Contracts\View\View; use Illuminate\View\Component; @@ -42,13 +43,13 @@ public function isItChristmas() : bool { } public function isItAprilFools() : bool { - $currentDate = new DateTime(); + $tz = new DateTimeZone("Europe/London"); + $currentDate = new DateTime("now", $tz); $currentDate->setTime(0, 0); $currentYear = intval($currentDate->format('Y')); - $aprilFools = new DateTime("$currentYear-04-01"); + $aprilFools = new DateTime("$currentYear-04-01", $tz); return $currentDate == $aprilFools; } - } diff --git a/config/app.php b/config/app.php index 551f521..88bdeae 100644 --- a/config/app.php +++ b/config/app.php @@ -5,7 +5,7 @@ return [ 'name' => env('APP_NAME', 'wah.moe'), - 'version' => '2026.03.31', + 'version' => '2026.03.31-patch0', 'env' => env('APP_ENV', 'production'), 'debug' => (bool)env('APP_DEBUG', false), 'url' => env('APP_URL', 'http://localhost'),