Replace direct calls to Carbon class.

This commit is contained in:
James Cole
2023-02-11 07:36:45 +01:00
parent 79e98cf8a2
commit c979cfcd89
44 changed files with 137 additions and 103 deletions

View File

@@ -42,8 +42,8 @@ class ExportRequest extends FormRequest
public function getAll(): array
{
$result = [
'start' => $this->getCarbonDate('start') ?? Carbon::now()->subYear(),
'end' => $this->getCarbonDate('end') ?? Carbon::now(),
'start' => $this->getCarbonDate('start') ?? today(config('app.timezone'))->subYear(),
'end' => $this->getCarbonDate('end') ?? today(config('app.timezone')),
'type' => $this->convertString('type'),
];
$parts = explode(',', $this->convertString('accounts'));

View File

@@ -56,7 +56,7 @@ class CronRequest extends FormRequest
{
$data = [
'force' => false,
'date' => Carbon::now(),
'date' => today(config('app.timezone')),
];
if ($this->has('force')) {
$data['force'] = $this->boolean('force');