Set the DB timezone on each connection to match the APP_TIMEZONE value

This commit is contained in:
Dane Everitt 2020-10-25 15:07:11 -07:00
parent 8c6327fd32
commit 996fb5b46f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 29 additions and 0 deletions

View file

@ -1,5 +1,7 @@
<?php
use Pterodactyl\Helpers\Time;
return [
/*
|--------------------------------------------------------------------------
@ -43,6 +45,7 @@ return [
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_PREFIX', ''),
'strict' => env('DB_STRICT_MODE', false),
'timezone' => env('DB_TIMEZONE', Time::getMySQLTimezoneOffset(env('APP_TIMEZONE')))
],
/*
@ -65,6 +68,7 @@ return [
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
'timezone' => env('DB_TIMEZONE', Time::getMySQLTimezoneOffset(env('APP_TIMEZONE')))
],
],