From 6222a1386cd2a959eff33f27690db60a981d63cc Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 12 Jan 2021 18:38:16 +1100 Subject: [PATCH] Fixes for timezones --- app/Utils/Traits/MakesDates.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Utils/Traits/MakesDates.php b/app/Utils/Traits/MakesDates.php index fb47b1c2cf86..0c730b22de3d 100644 --- a/app/Utils/Traits/MakesDates.php +++ b/app/Utils/Traits/MakesDates.php @@ -95,6 +95,8 @@ trait MakesDates private function convertToDateObject($date) { - return new DateTime($date); + $dt = DateTime($date); + $dt->setTimezone(new DateTimeZone('UTC')); + return $dt; } }