Skip to content

Firefly III: a personal finances manager

Fix #10700

James Cole901e113fefbc
diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php
index dbf91fb2ad..58e4eb0746 100644
--- a/app/Http/Controllers/PreferencesController.php
+++ b/app/Http/Controllers/PreferencesController.php
@@ -277,10 +277,10 @@ class PreferencesController extends Controller
// custom fiscal year
$customFiscalYear = 1 === (int) $request->get('customFiscalYear');
- $string = strtotime((string) $request->get('fiscalYearStart'));
- if (false !== $string) {
- $fiscalYearStart = Carbon::createFromTimestamp($string)->format('m-d');
- Preferences::set('customFiscalYear', $customFiscalYear);
+ Preferences::set('customFiscalYear', $customFiscalYear);
+ $fiscalYearString = (string) $request->get('fiscalYearStart');
+ if('' !== $fiscalYearString) {
+ $fiscalYearStart = Carbon::parse($fiscalYearString, config('app.timezone'))->format('m-d');
Preferences::set('fiscalYearStart', $fiscalYearStart);
}