1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Set MySQL time zone by PHP setting

This commit is contained in:
Jakub Vrana
2011-03-11 11:10:49 +01:00
parent b0fe26ba3e
commit 0a8cd02636
2 changed files with 3 additions and 1 deletions

View File

@@ -250,7 +250,8 @@ if (!defined("DRIVER")) {
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->query("SET SQL_QUOTE_SHOW_CREATE=1");
$connection->query("SET sql_quote_show_create = 1");
$connection->query("SET time_zone = " . $connection->quote(substr_replace(date("O"), ":", -2, 0))); // date("P") available since PHP 5.1.3
return $connection;
}
return $connection->error;