Set MySQL time zone by PHP setting only in Editor

This commit is contained in:
Jakub Vrana 2011-03-23 13:35:35 +01:00
parent d8cba0eb5d
commit e89f42d466
3 changed files with 3 additions and 2 deletions

View file

@ -251,7 +251,6 @@ if (!defined("DRIVER")) {
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$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, @ - requires date.timezone since PHP 5.3.0
return $connection;
}
return $connection->error;

View file

@ -10,12 +10,12 @@ Parse UTF-16 and UTF-8 BOM in all text uploads
Display ; in history (thanks to Jan Cerny)
Use DELIMITER in history
Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
Set MySQL time zone by PHP setting
Disable maxlength with functions in edit
Better placement of AJAX icon
Table header in CSV export (Editor)
Time format hint (Editor)
Respect order after search (Editor)
Set MySQL time zone by PHP setting (Editor)
Allow own code in <head> (customization)
Polish translation

View file

@ -50,6 +50,8 @@ document.getElementById('username').focus();
}
function login($login, $password) {
global $connection;
$connection->query("SET time_zone = " . q(substr_replace(@date("O"), ":", -2, 0))); // date("P") available since PHP 5.1.3, @ - requires date.timezone since PHP 5.3.0
return true;
}