[PR #2112] [CLOSED] feat: make timezone configurable via APP_TIMEZONE env var #1763

Closed
opened 2026-02-04 20:13:36 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/2112
Author: @gavinmcfall
Created: 1/16/2026
Status: Closed

Base: mainHead: fix/timezone-env-var


📝 Commits (1)

  • 051726a feat: make timezone configurable via APP_TIMEZONE env var

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 config/app.php (+1 -1)

📄 Description

Summary

Allow users to configure the application timezone via the APP_TIMEZONE environment variable, defaulting to UTC for backwards compatibility.

Problem

Currently the timezone is hardcoded to UTC in config/app.php:

'timezone' => 'UTC',

This makes it impossible to configure the application timezone via environment variables, which is the standard configuration method for containerized deployments.

Solution

Change to read from environment variable with fallback:

'timezone' => env('APP_TIMEZONE', 'UTC'),

Use Case

Containerized deployments (Docker, Kubernetes) where configuration is managed via environment variables rather than editing files. Users can now set APP_TIMEZONE=America/New_York (or any valid timezone) in their container configuration.

Testing

  • Verified the change is backwards compatible (defaults to UTC)
  • Standard Laravel configuration pattern used by other settings in the same file

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/panel/pull/2112 **Author:** [@gavinmcfall](https://github.com/gavinmcfall) **Created:** 1/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/timezone-env-var` --- ### 📝 Commits (1) - [`051726a`](https://github.com/pelican-dev/panel/commit/051726aceb2b943edb77a370eb38a49b918eefeb) feat: make timezone configurable via APP_TIMEZONE env var ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `config/app.php` (+1 -1) </details> ### 📄 Description ## Summary Allow users to configure the application timezone via the `APP_TIMEZONE` environment variable, defaulting to `UTC` for backwards compatibility. ## Problem Currently the timezone is hardcoded to `UTC` in `config/app.php`: ```php 'timezone' => 'UTC', ``` This makes it impossible to configure the application timezone via environment variables, which is the standard configuration method for containerized deployments. ## Solution Change to read from environment variable with fallback: ```php 'timezone' => env('APP_TIMEZONE', 'UTC'), ``` ## Use Case Containerized deployments (Docker, Kubernetes) where configuration is managed via environment variables rather than editing files. Users can now set `APP_TIMEZONE=America/New_York` (or any valid timezone) in their container configuration. ## Testing - Verified the change is backwards compatible (defaults to UTC) - Standard Laravel configuration pattern used by other settings in the same file --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 20:13:36 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel#1763