Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set MySQL time zone by PHP setting

  • Loading branch information...
commit 0a8cd0263614a07c252fca96d209db3a7a85174c 1 parent b0fe26b
@vrana authored
Showing with 3 additions and 1 deletion.
  1. +2 −1  adminer/drivers/mysql.inc.php
  2. +1 −0  changes.txt
View
3  adminer/drivers/mysql.inc.php
@@ -250,7 +250,8 @@ function connect() {
$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;
View
1  changes.txt
@@ -7,6 +7,7 @@ AJAX forms in Google Chrome
Parse UTF-16 and UTF-8 BOM in all text uploads
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
Polish translation
Adminer 3.2.0 (released 2011-02-24):
Please sign in to comment.
Something went wrong with that request. Please try again.