mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Replace direct calls to Carbon class.
This commit is contained in:
@@ -350,13 +350,13 @@ class BasicController extends Controller
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$date = Carbon::now()->startOfDay();
|
||||
$date = today(config('app.timezone'))->startOfDay();
|
||||
// start and end in the future? use $end
|
||||
if ($this->notInDateRange($date, $start, $end)) {
|
||||
/** @var Carbon $date */
|
||||
$date = session('end', Carbon::now()->endOfMonth());
|
||||
$date = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
}
|
||||
|
||||
|
||||
/** @var NetWorthInterface $netWorthHelper */
|
||||
$netWorthHelper = app(NetWorthInterface::class);
|
||||
$netWorthHelper->setUser($user);
|
||||
|
@@ -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'));
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user