Made app core timezone configurable via env

Related to #1407
This commit is contained in:
Dan Brown 2019-05-05 15:09:04 +01:00
parent 3f83c548f8
commit 5910e00fb8
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,11 @@ APP_LANG=en
# APP_LANG will be used if such a header is not provided. # APP_LANG will be used if such a header is not provided.
APP_AUTO_LANG_PUBLIC=true 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 # Database details
# Host can contain a port (localhost:3306) or a separate DB_PORT option can be used. # Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
DB_HOST=localhost DB_HOST=localhost

View File

@ -46,7 +46,7 @@ return [
'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''), 'url' => env('APP_URL', '') === 'http://bookstack.dev' ? '' : env('APP_URL', ''),
// Application timezone for back-end date functions. // Application timezone for back-end date functions.
'timezone' => 'UTC', 'timezone' => env('APP_TIMEZONE', 'UTC'),
// Default locale to use // Default locale to use
'locale' => env('APP_LANG', 'en'), 'locale' => env('APP_LANG', 'en'),