]> git.joonet.de Git - adminer.git/commitdiff
MySQL: Respect daylight saving time in dump (bug #384)
authorJakub Vrana <jakub@vrana.cz>
Fri, 21 Feb 2014 17:09:09 +0000 (09:09 -0800)
committerJakub Vrana <jakub@vrana.cz>
Fri, 21 Feb 2014 17:09:09 +0000 (09:09 -0800)
adminer/dump.inc.php
changes.txt

index 6e4290090b26a62089ebe4200d3187a2e20a0f21..9a7b07b2380dc8cee51a98db422310957814e233 100644 (file)
@@ -18,10 +18,13 @@ if ($_POST && !$error) {
 
 " . ($jush != "sql" ? "" : "SET NAMES utf8;
 " . ($_POST["data_style"] ? "SET foreign_key_checks = 0;
-SET time_zone = " . q(substr(preg_replace('~^[^-]~', '+\0', $connection->result("SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP)")), 0, 6)) . ";
+SET time_zone = '+00:00';
 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 " : "") . "
 ");
+               if ($jush == "sql" && $_POST["data_style"]) {
+                       $connection->query("SET time_zone = '+00:00';");
+               }
        }
 
        $style = $_POST["db_style"];
index bb87c2632ebfdea333584950ee2c052a13bbd7bc..e995e4eee024000e80542fd195368225bd20040d 100644 (file)
@@ -1,4 +1,5 @@
 Adminer 4.0.4-dev:
+MySQL: Respect daylight saving time in dump, bug since Adminer 3.6.4
 SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
 Editor: Fix login() method, bug since Adminer 4.0.0