From d9a1e6aba7eb7bb983a3a748fc9a70898c15f622 Mon Sep 17 00:00:00 2001 From: Nabeel S Date: Mon, 9 Dec 2019 22:11:20 -0500 Subject: [PATCH] Use DateTimeZone instead of int for creating datetime closes #461 --- app/Services/CronService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/CronService.php b/app/Services/CronService.php index 51ce8f32..fd1c98fd 100644 --- a/app/Services/CronService.php +++ b/app/Services/CronService.php @@ -59,7 +59,7 @@ class CronService extends Service */ public function updateLastRunTime() { - $dt = new DateTime('now', DateTimeZone::UTC); + $dt = new DateTime('now', new DateTimeZone('UTC')); $this->kvpRepo->save('cron_last_run', $dt->format(DateTime::ISO8601)); } @@ -78,7 +78,7 @@ class CronService extends Service try { $dt = DateTime::createFromFormat(DateTime::ISO8601, $last_run); - $dt_now = new DateTime('now', DateTimeZone::UTC); + $dt_now = new DateTime('now', new DateTimeZone('UTC')); } catch (Exception $e) { Log::error('Error checking for cron problem: '.$e->getMessage()); return true;