]> git.localhorst.tv Git - alttp.git/commitdiff
fixup speedgaming timezone shenanigangs?
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Mar 2023 13:13:26 +0000 (14:13 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Mar 2023 13:13:26 +0000 (14:13 +0100)
app/Console/Commands/SyncSpeedGaming.php

index 3f2058f857136a986cd05c717b5356176fdb134b..b2ac7f1b315fd94f2bcd15d571f9bcc958323959 100644 (file)
@@ -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;
                }