An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
remove unnecessary validation and fix safe to DB
ayntk-ai44f319460f42
diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.phpindex 318b0a8b48..c5ffcf974d 100644--- a/app/Livewire/Server/Form.php+++ b/app/Livewire/Server/Form.php@@ -243,6 +243,7 @@ class Form extends Componentreturn;}$this->server->settings->server_timezone = $value;+ $this->updateServerTimezone($value);}private function updateServerTimezone($value)@@ -260,42 +261,13 @@ class Form extends Component"date +%Z","cat /etc/timezone 2>/dev/null || echo 'Unable to read /etc/timezone'",];-- $result = instant_remote_process($commands, $this->server);-- if (!isset($result['output']) || empty($result['output'])) {- throw new \Exception("No output received from server. The timezone may not have been updated.");- }-- $output = is_array($result['output']) ? $result['output'] : explode("\n", trim($result['output']));- $output = array_filter($output); // Remove empty lines-- if (count($output) < 2) {- throw new \Exception("Unexpected output format: " . implode("\n", $output));- }-- $oldTimezone = $output[0];- $newTimezone = end($output);-- $errors = array_filter($output, function($line) {- return strpos($line, 'failed') !== false;- });-- if (!empty($errors)) {- throw new \Exception("Timezone change failed. Errors: " . implode(", ", $errors));- }-- if ($oldTimezone === $newTimezone) {- throw new \Exception("Timezone change failed. The timezone is still set to {$oldTimezone}.");- }-- $dateTime = new \DateTime('now', new \DateTimeZone($value));- $phpTimezone = $dateTime->getTimezone()->getName();-- $this->server->settings->server_timezone = $phpTimezone;++ instant_remote_process($commands, $this->server);++ $this->server->settings->server_timezone = $value;$this->server->settings->save();-- $this->dispatch('success', "Timezone successfully changed from {$oldTimezone} to {$newTimezone} (PHP: {$phpTimezone}).");++ $this->dispatch('success', "Timezone successfully changed to {$value}.");return true;} catch (\Exception $e) {$this->dispatch('error', $e->getMessage());