]> git.localhorst.tv Git - alttp.git/blobdiff - app/Console/Commands/SyncSRA.php
slightly improved message generation
[alttp.git] / app / Console / Commands / SyncSRA.php
index 45c2002edd67ce522ffd5ea06ca88625d9271ec7..017b5f1fd9d0d00169eab7bd947781205b98bed4 100644 (file)
@@ -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;
                }