From 64fd36d43743bb03cd5d6eb8057bf8aa01ee2706 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Mar 2018 19:39:41 +0100 Subject: [PATCH] Fix #1227 --- .env.docker | 1 + .env.example | 4 ++++ .env.heroku | 4 ++++ .env.sandstorm | 4 ++++ .env.testing | 1 + config/app.php | 2 +- 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.env.docker b/.env.docker index e9d78a6f5f..2ed1c88904 100644 --- a/.env.docker +++ b/.env.docker @@ -88,3 +88,4 @@ DEMO_PASSWORD= IS_DOCKER=true IS_SANDSTORM=false IS_HEROKU=false +TZ=${TZ} \ No newline at end of file diff --git a/.env.example b/.env.example index 2d156589fa..aa23f9660a 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,10 @@ SITE_OWNER=mail@example.com # Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it APP_KEY=SomeRandomStringOf32CharsExactly +# Change this value to your preferred time zone. +# Example: Europe/Amsterdam +TZ=UTC + # APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy. APP_URL=http://localhost TRUSTED_PROXIES= diff --git a/.env.heroku b/.env.heroku index f4b16694c3..9b16f9ab93 100644 --- a/.env.heroku +++ b/.env.heroku @@ -13,6 +13,10 @@ SITE_OWNER=heroku@example.com # Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2 +# Change this value to your preferred time zone. +# Example: Europe/Amsterdam +TZ=UTC + # APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy. APP_URL=http://localhost TRUSTED_PROXIES= diff --git a/.env.sandstorm b/.env.sandstorm index 4504105a92..42c3108dac 100755 --- a/.env.sandstorm +++ b/.env.sandstorm @@ -13,6 +13,10 @@ SITE_OWNER=sandstorm@example.com # Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it APP_KEY=SomeRandomStringOf32CharsExactly +# Change this value to your preferred time zone. +# Example: Europe/Amsterdam +TZ=UTC + # APP_URL and TRUSTED_PROXIES are useful when using Docker and/or a reverse proxy. APP_URL=http://localhost TRUSTED_PROXIES= diff --git a/.env.testing b/.env.testing index e33729c196..1b9f7ab7f2 100644 --- a/.env.testing +++ b/.env.testing @@ -6,6 +6,7 @@ APP_LOG=daily APP_LOG_LEVEL=debug APP_URL=http://localhost TRUSTED_PROXIES= +TZ=Europe/Amsterdam DB_CONNECTION=sqlite DB_HOST=127.0.0.1 diff --git a/config/app.php b/config/app.php index 1c45157c18..6a4a8ae47a 100644 --- a/config/app.php +++ b/config/app.php @@ -27,7 +27,7 @@ return [ 'env' => env('APP_ENV', 'production'), 'debug' => env('APP_DEBUG', false), 'url' => env('APP_URL', 'http://localhost'), - 'timezone' => 'UTC', + 'timezone' => env('TZ', 'UTC'), 'locale' => 'en_US', 'fallback_locale' => 'en_US', 'key' => env('APP_KEY'),