]> BookStack Code Mirror - bookstack/commitdiff
Made app core timezone configurable via env
authorDan Brown <redacted>
Sun, 5 May 2019 14:09:04 +0000 (15:09 +0100)
committerDan Brown <redacted>
Sun, 5 May 2019 14:09:04 +0000 (15:09 +0100)
Related to #1407

.env.example.complete
config/app.php

index 911d924df75f4c4fa6b6c2892529e154f2b78a0d..37421a419e5485c3f4e6d612bf08236e3a0f2159 100644 (file)
@@ -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
index 682462462a75c1ee6510eb18cc374c68cc65185f..aaeafb98df291e6925d6ade1d283d1fcb9804379 100755 (executable)
@@ -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'),