X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FConsole%2FCommands%2FSyncSRA.php;h=017b5f1fd9d0d00169eab7bd947781205b98bed4;hb=f18af7cfb219ab9c07635ea8bbae80f2a9cee78e;hp=45c2002edd67ce522ffd5ea06ca88625d9271ec7;hpb=c426e270c4da363fd5547cad6ff185d2e7c94e43;p=alttp.git diff --git a/app/Console/Commands/SyncSRA.php b/app/Console/Commands/SyncSRA.php index 45c2002..017b5f1 100644 --- a/app/Console/Commands/SyncSRA.php +++ b/app/Console/Commands/SyncSRA.php @@ -40,7 +40,7 @@ class SyncSRA extends Command { $events = Event::where('external_schedule', 'LIKE', 'sra:%') ->where(function (Builder $query) { $query->whereNull('end'); - $query->orWhere('end', '<', now()); + $query->orWhere('end', '>', now()); }) ->get(); @@ -83,7 +83,7 @@ class SyncSRA extends Command { } else { $episode->title = $row[2]; } - $start = Carbon::createFromFormat('m/d/Y H:i', $row[0].' '.$row[1], 'America/Chicago'); + $start = Carbon::createFromFormat('m/d/Y H:i', $row[0].' '.$row[1], 'America/Detroit')->setTimezone('UTC'); if (!$episode->start || $start->ne($episode->start)) { $episode->start = $start; }