Skip to content
Browse files

Set MySQL time zone by PHP setting only in Editor

  • Loading branch information...
1 parent d8cba0e commit e89f42d4665fef4a003a415353e2ecb6b2a8c017 @vrana committed Mar 23, 2011
Showing with 3 additions and 2 deletions.
  1. +0 −1 adminer/drivers/mysql.inc.php
  2. +1 −1 changes.txt
  3. +2 −0 editor/include/adminer.inc.php
View
1 adminer/drivers/mysql.inc.php
@@ -251,7 +251,6 @@ function connect() {
$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
2 changes.txt
@@ -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
2 editor/include/adminer.inc.php
@@ -50,6 +50,8 @@ function loginForm() {
}
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;
}

0 comments on commit e89f42d

Please sign in to comment.
Something went wrong with that request. Please try again.