From 065f2f3ca9b4c890882fdbf3e20e98a05961a4bf Mon Sep 17 00:00:00 2001 From: didier Date: Mon, 11 Nov 2024 07:57:37 +0100 Subject: [PATCH 1/2] fix invalid format --- app/Console/Commands/CertificateExpiracy.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/CertificateExpiracy.php b/app/Console/Commands/CertificateExpiracy.php index 08f28f46..f848b1fc 100644 --- a/app/Console/Commands/CertificateExpiracy.php +++ b/app/Console/Commands/CertificateExpiracy.php @@ -66,8 +66,12 @@ public function handle() Log::debug('CertificateExpiracy - ' . $cert->name . ' never notified.'); $cert->last_notification = now(); $cert->save(); - } elseif ($cert->last_notification > now()->addDays(-intval(config('mercator-config.cert.expire-delay')))) { - Log::debug('CertificateExpiracy - ' . $cert->name . ' already notified.'); + } elseif ( + Carbon::createFromFormat(config('panel.date_format') . ' ' . config('panel.time_format'), $cert->last_notification) + ->lessThan( + now()->addDays(-intval(config('mercator-config.cert.expire-delay')))) + ) { + Log::debug('CertificateExpiracy - ' . $cert->name . ' already notified on ' . $cert->last_notification); $certificates->forget($key); } else { // must be notified From 1c7e9b1ea4c5f4fb3e8c83fdf74595b70a7b8f45 Mon Sep 17 00:00:00 2001 From: didier Date: Mon, 11 Nov 2024 07:57:48 +0100 Subject: [PATCH 2/2] layout --- resources/views/admin/processes/create.blade.php | 2 +- resources/views/admin/processes/edit.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/admin/processes/create.blade.php b/resources/views/admin/processes/create.blade.php index 292b0da4..afa9ee3a 100644 --- a/resources/views/admin/processes/create.blade.php +++ b/resources/views/admin/processes/create.blade.php @@ -11,7 +11,7 @@
- + @if($errors->has('name'))
{{ $errors->first('name') }} diff --git a/resources/views/admin/processes/edit.blade.php b/resources/views/admin/processes/edit.blade.php index bc90466e..294806c0 100644 --- a/resources/views/admin/processes/edit.blade.php +++ b/resources/views/admin/processes/edit.blade.php @@ -12,7 +12,7 @@
- + @if($errors->has('name'))
{{ $errors->first('name') }}