{"record":{"id":"2e7bf920231c2eae","repo":"coollabsio/coolify","slug":"invalid-timezone","errorCode":null,"errorMessage":"Invalid timezone.","messagePattern":"Invalid timezone\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Livewire/Server/Show.php","lineNumber":275,"sourceCode":"            $this->server->save();\n\n            $this->server->settings->connection_timeout = $this->connectionTimeout;\n            $this->server->settings->is_swarm_manager = $this->isSwarmManager;\n            $this->server->settings->wildcard_domain = $this->wildcardDomain;\n            $this->server->settings->is_swarm_worker = $this->isSwarmWorker;\n            $this->server->settings->is_build_server = $this->isBuildServer;\n            $this->server->settings->is_metrics_enabled = $this->isMetricsEnabled;\n            $this->server->settings->sentinel_token = $this->sentinelToken;\n            $this->server->settings->sentinel_metrics_refresh_rate_seconds = $this->sentinelMetricsRefreshRateSeconds;\n            $this->server->settings->sentinel_metrics_history_days = $this->sentinelMetricsHistoryDays;\n            $this->server->settings->sentinel_push_interval_seconds = $this->sentinelPushIntervalSeconds;\n            $this->server->settings->sentinel_custom_url = $this->sentinelCustomUrl;\n            $this->server->settings->is_sentinel_enabled = $this->isSentinelEnabled;\n            $this->server->settings->is_sentinel_debug_enabled = $this->isSentinelDebugEnabled;\n\n            if (! validate_timezone($this->serverTimezone)) {\n                $this->serverTimezone = config('app.timezone');\n                throw new \\Exception('Invalid timezone.');\n            } else {\n                $this->server->settings->server_timezone = $this->serverTimezone;\n            }\n\n            $this->server->settings->save();\n        } else {\n            $this->name = $this->server->name;\n            $this->description = $this->server->description;\n            $this->ip = $this->server->ip;\n            $this->user = $this->server->user;\n            $this->port = $this->server->port;\n            $this->connectionTimeout = $this->server->settings->connection_timeout;\n\n            $this->wildcardDomain = $this->server->settings->wildcard_domain;\n            $this->isReachable = $this->server->settings->is_reachable;\n            $this->isUsable = $this->server->settings->is_usable;\n            $this->isSwarmManager = $this->server->settings->is_swarm_manager;\n            $this->isSwarmWorker = $this->server->settings->is_swarm_worker;","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Livewire/Server/Show.php#L257-L293","documentation":"Before persisting server settings, syncData() validates serverTimezone with validate_timezone(), which is a strict in_array($tz, timezone_identifiers_list()) lookup. PHP accepts only real tz identifiers (UTC, Europe/Budapest-style Region/City keys) - abbreviations like CET or EST, offset strings like UTC+02, and wrong-case spellings fail. On failure the field resets to config('app.timezone') and the save aborts.","triggerScenarios":"Entering 'CET', 'GMT+2', 'utc', an empty string, or 'America/New York' (space) instead of 'America/New_York'; hand-typed values in the timezone field rather than picking from the list.","commonSituations":"Users abbreviating timezones from habit; values copied from TZ-unaware tools; JS Intl output (like 'UTC+02:00') pasted into the field.","solutions":["Use an IANA identifier from PHP's list, e.g. 'Europe/Berlin' or 'UTC'","Pick from DateTimeZone::listIdentifiers() output to guarantee a match","If scripting, validate first: php artisan tinker --execute 'var_dump(in_array(\"Europe/Berlin\", timezone_identifiers_list()));'","After a failure, re-enter the timezone - the field was reset to the app default"],"exampleFix":"// before\n$this->serverTimezone = 'CET';\n\n// after\n$this->serverTimezone = 'Europe/Budapest';","handlingStrategy":"validation","validationCode":"if (! validate_timezone($timezone)) {\n    // pick from timezone_identifiers_list() before submit\n}","typeGuard":"/** @param mixed $tz */\nfunction isValidTimezone($tz): bool\n{\n    return is_string($tz) && in_array($tz, timezone_identifiers_list(), true);\n}","tryCatchPattern":"Catch \\Exception in submit via handleError($e, $this); the field resets to config('app.timezone') on failure, so re-enter an IANA identifier and save again.","preventionTips":["Use a dropdown backed by DateTimeZone::listIdentifiers()","Accept only Region/City or UTC - not abbreviations or offsets","Case matters: 'utc' is not 'UTC'"],"tags":["timezone","validation","server","settings"],"backgroundTag":"invalid-timezone-value","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}