Skip to content

Commit 79a94de

Browse files
authored
remove APP_TIMEZONE environment variable (#6536)
force the timezone to be defined in the config file, rather than deferring to an environment variable. IMO having the timezone dependent on an environment variable adds an unnecessary amount of risk for your average user who may be unaware of the effects from changing this value. some scenarios where this could cause issues: - devs set this value to their local timezone on their local dev machines, and they are writing `Carbon:create()` commands or similar that now are working only under the assumption of that timezone value - you have multiple production servers setup across the country and each has their own timezone value according to their location, but they all talk to a central database. now the database is loaded with mixed timezone variables having an explicit value defined once for the application removes these risks. reverts part of #6188
1 parent 6f1ebe2 commit 79a94de

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ APP_NAME=Laravel
22
APP_ENV=local
33
APP_KEY=
44
APP_DEBUG=true
5-
APP_TIMEZONE=UTC
65
APP_URL=http://localhost
76

87
APP_LOCALE=en

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
|
6666
*/
6767

68-
'timezone' => env('APP_TIMEZONE', 'UTC'),
68+
'timezone' => 'UTC',
6969

7070
/*
7171
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)