Skip to content
Snippets Groups Projects
Commit 76087fcf authored by JediKev's avatar JediKev
Browse files

db: System Time Zone

This addresses issue 5156 where using something like AWS RDS shows incorrect
timezone for the database. In systems like AWS RDS you cannot set the
`@@global.system_time_zone` variable to anything other than `UTC` which is a
problem. This updates `db_connect` to set the session timezone to the global
timezone for every connection. This will ensure the appropriate timezone is
used in subsequent methods.
parent a0221ef1
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ function db_connect($host, $user, $passwd, $options = array()) {
'CHARACTER SET' => 'utf8',
'COLLATION_CONNECTION' => 'utf8_general_ci',
'SQL_MODE' => '',
'TIME_ZONE' => '@@global.time_zone',
), 'session');
$__db->set_charset('utf8');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment