Skip to content

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