mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Replace direct calls to Carbon class.
This commit is contained in:
		| @@ -74,7 +74,7 @@ class UpdateRequest implements UpdateRequestInterface | ||||
|         // always fall back to current version: | ||||
|         $return = [ | ||||
|             'version' => config('firefly.version'), | ||||
|             'date'    => Carbon::today()->startOfDay(), | ||||
|             'date'    => today(config('app.timezone'))->startOfDay(), | ||||
|             'level'   => 'error', | ||||
|             'message' => (string)trans('firefly.unknown_error'), | ||||
|         ]; | ||||
| @@ -171,7 +171,7 @@ class UpdateRequest implements UpdateRequestInterface | ||||
|         // a newer version is available! | ||||
|         /** @var Carbon $released */ | ||||
|         $released     = $information['date']; | ||||
|         $today        = Carbon::today()->startOfDay(); | ||||
|         $today        = today(config('app.timezone'))->startOfDay(); | ||||
|         $diff         = $today->diffInDays($released); | ||||
|         $expectedDiff = config('firefly.update_minimum_age') ?? 6; | ||||
|         // it's still very fresh, and user wants a stable release: | ||||
|   | ||||
| @@ -65,7 +65,7 @@ class GroupCloneService | ||||
|     { | ||||
|         $newJournal                       = $journal->replicate(); | ||||
|         $newJournal->transaction_group_id = $newGroup->id; | ||||
|         $newJournal->date                 = Carbon::now(); | ||||
|         $newJournal->date                 = today(config('app.timezone')); | ||||
|         $newJournal->save(); | ||||
|  | ||||
|         foreach ($journal->transactions as $transaction) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user