diff --git a/packages/forms/src/Components/DateTimePicker.php b/packages/forms/src/Components/DateTimePicker.php index c52cbd49c36..bda6240fe27 100644 --- a/packages/forms/src/Components/DateTimePicker.php +++ b/packages/forms/src/Components/DateTimePicker.php @@ -84,10 +84,10 @@ protected function setUp(): void if (! $state instanceof CarbonInterface) { try { - $state = Carbon::createFromFormat($component->getFormat(), $state, $component->getTimezone()); + $state = Carbon::createFromFormat($component->getFormat(), $state, config('app.timezone')); } catch (InvalidFormatException $exception) { try { - $state = Carbon::parse($state, $component->getTimezone()); + $state = Carbon::parse($state, config('app.timezone')); } catch (InvalidFormatException $exception) { $component->state(null); @@ -96,7 +96,7 @@ protected function setUp(): void } } - $state->setTimezone($component->getTimezone()); + $state = $state->setTimezone($component->getTimezone()); if (! $component->isNative()) { $component->state((string) $state);