visuddhinanda пре 3 година
родитељ
комит
45f5ba8564
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      app/Console/Kernel.php

+ 10 - 1
app/Console/Kernel.php

@@ -16,7 +16,6 @@ class Kernel extends ConsoleKernel
     protected function schedule(Schedule $schedule)
     {
         $schedule->command('upgrade:daily')
-				 ->timezone('Asia/Shanghai')
                  ->dailyAt('00:00')
                  ->emailOutputTo(config("app.email.ScheduleEmailOutputTo"))
 				 ->emailOutputOnFailure(config("app.email.ScheduleEmailOutputOnFailure"));
@@ -33,4 +32,14 @@ class Kernel extends ConsoleKernel
 
         require base_path('routes/console.php');
     }
+
+	/**
+	 * Get the timezone that should be used by default for scheduled events.
+	 *
+	 * @return \DateTimeZone|string|null
+	 */
+	protected function scheduleTimezone()
+	{
+		return 'Asia/Shanghai';
+	}
 }