From 5910e00fb8cc2efd676142c4fb784cea5e33dd9a Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 5 May 2019 15:09:04 +0100 Subject: [PATCH] Made app core timezone configurable via env Related to #1407 --- .env.example.complete | 5 +++++ config/app.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example.complete b/.env.example.complete index 911d924df..37421a419 100644 --- a/.env.example.complete +++ b/.env.example.complete @@ -32,6 +32,11 @@ APP_LANG=en # APP_LANG will be used if such a header is not provided. APP_AUTO_LANG_PUBLIC=true +# Application timezone +# Used where dates are displayed such as on exported content. +# Valid timezone values can be found here: https://www.php.net/manual/en/timezones.php +APP_TIMEZONE=UTC + # Database details # Host can contain a port (localhost:3306) or a separate DB_PORT option can be used. DB_HOST=localhost diff --git a/config/app.php b/config/app.php index 682462462..aaeafb98d 100755 --- a/config/app.php +++ b/config/app.php @@ -46,7 +46,7 @@ return [ 'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''), // Application timezone for back-end date functions. - 'timezone' => 'UTC', + 'timezone' => env('APP_TIMEZONE', 'UTC'), // Default locale to use 'locale' => env('APP_LANG', 'en'),