Skip to content

Added APP_LOCALE and APP_TIMEZONE to .env #6346

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
wants to merge 1 commit into from
Closed

Added APP_LOCALE and APP_TIMEZONE to .env #6346

wants to merge 1 commit into from

Conversation

devrfc83
Copy link

Most of the settings on the config/app.php file are customizable from .env, but the 'locale' and 'timezone' are not.

The modification in the config/app.php file is harmless: it reads an environment variable if it's set, and if not it falls back to the default values that were included anyways.

I also modified the .env.example file, adding both variables just in case.

Most of the settings on the **config/app.php** file are customizable
from **.env**, but the 'locale' and 'timezone' are not.

The modification in the config/app.php file is harmless: it reads an
environment variable if it's set, and if not it falls back to the
default values that were included anyways.

I also modified the .env.example file, adding both variables just in
case.

Signed-off-by: Rodrigo Fabián Andrés Fuentealba Cartes <chessandrock@gmail.com>
@devrfc83
Copy link
Author

Explaining my use case and giving a little more context:

Working in an environment producing software for organizations that work in three different timezones (Chile Continental, Magallanes and Easter Island). Another developer who works here before I did had maintained three forks of each applications and the only difference between these forks is the timezone... which he uses to make adjustments to the date/time fields before consolidating the data at a national level. (Yes, I know it sounds silly).

I already made this change in the apps I mentioned but now that I need to write another one, I wondered why is this not a Laravel feature given that everything else on the config/app.php file is coming from an environment variable.

@driesvints
Copy link
Member

This is coming in Laravel v11 👍

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.

2 participants