Skip to content

Firefly III: a personal finances manager

Fix #1227

James Cole64fd36d43743
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 @@ [email protected]
# 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 @@ [email protected]
# 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 @@ [email protected]
# 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'),