From: Daniel Karbach Date: Sun, 12 Mar 2023 13:13:26 +0000 (+0100) Subject: fixup speedgaming timezone shenanigangs? X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=15aa14e6a7fade13a2dd5c135b8da62c5e65d150;p=alttp.git fixup speedgaming timezone shenanigangs? --- diff --git a/app/Console/Commands/SyncSpeedGaming.php b/app/Console/Commands/SyncSpeedGaming.php index 3f2058f..b2ac7f1 100644 --- a/app/Console/Commands/SyncSpeedGaming.php +++ b/app/Console/Commands/SyncSpeedGaming.php @@ -104,6 +104,10 @@ class SyncSpeedGaming extends Command { $episode->event()->associate($event); $episode->title = $sgEntry['match1']['title']; $start = Carbon::createFromFormat('Y-m-d\TH:i:sP', $sgEntry['when']); + // if speedgaming is in DST, it fucks up the timestamp + if (Carbon::now(new \DateTimeZone('America/Chicago'))->dst) { + $start->add(1, 'hour'); + } if (!$episode->start || $start->ne($episode->start)) { $episode->start = $start; }