Skip to content

Add APP_TIMEZONE environment variable #6642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

madhusoodhananer
Copy link

This PR adds support for configuring the application timezone via an APP_TIMEZONE environment variable.

Changes

  • Added APP_TIMEZONE=UTC to .env.example
  • Modified config/app.php to use env('APP_TIMEZONE', 'UTC') instead of hardcoded 'UTC'

Benefits

  • Allows applications to easily configure timezone via environment variables
  • Maintains backward compatibility with UTC as the default
  • Follows Laravel's convention of making configuration environment-driven
  • Useful for applications deployed across different timezones

Testing

  • Existing functionality remains unchanged when APP_TIMEZONE is not set
  • When APP_TIMEZONE is set, the application uses the specified timezone

Allow application timezone to be configured via APP_TIMEZONE environment variable while maintaining UTC as the default fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants