Database management in a single PHP file
Go to file
Lukas Tribus 32f1e856ad Editor: Don't set time zone from PHP
Current implementation checks the delta between the local time and
UTC, and applies the delta as time zone for MySQL.

This assumption is wrong if the current time is DST enabled, but the
time that is converted isn't - and vice versa.

For example, Europe/Prague is "CET-1CEST,M3.5.0,M10.5.0/3", when
the MySQL connections is setup now (September, DST enabled) and
we are reading a TIMESTAMP from November, then MySQL applies +0200
instead of +0100 to that timestamp even though November is supposed
to be DST disabled.

There is no reliable and portable way in PHP to understand the
time zone, especially since PHP >= 5.4.0 ignores environment
variable and OS settings [1].

MySQL needs to be properly setup (TZ data loaded [2] and default
TZ set [3]), then everything will work just fine.

The current implementation however causes wrong data 50% of the
time, even when OS/MySQL/PHP is properly setup. As a MySQL
connection will converte timestamps from both DST enabled and
DST disabled dates, a static UTC offset must never be set at
connection level (set time_zone = ...).

This change removes the current implementation, therefor maintaining
OS/MySQL defaults, fixing the DST issue in properly configured
environments.

[1] http://php.net/manual/en/function.date-default-timezone-get.php
[2] https://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html
[3] https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
2017-09-09 11:44:42 +02:00
adminer MySQL: Remove dedicated view for replication status 2017-05-19 11:11:44 +02:00
designs Make sure all sidebar elements are pushed down, not just the form. 2017-09-09 11:39:47 +02:00
editor Editor: Don't set time zone from PHP 2017-09-09 11:44:42 +02:00
externals Update JUSH 2017-03-15 12:53:26 +01:00
plugins Update AdminerTablesFilter to produce li as per c9801e2e24 2017-05-19 11:23:35 +02:00
tests Use 'Create database' instead of 'Create new database' 2017-02-20 16:47:03 +01:00
.gitignore Add Composer support 2014-11-11 08:41:58 -08:00
.gitmodules Remove modules used only by plugins 2014-02-01 10:28:56 -08:00
.travis.yml Lint PHP files 2017-02-21 13:47:19 +01:00
changes.txt Editor: Don't set time zone from PHP 2017-09-09 11:44:42 +02:00
compile.php MySQL: Remove dedicated view for replication status 2017-05-19 11:11:44 +02:00
composer.json Update URL 2017-02-27 13:44:22 +01:00
coverage.php Replace isset($var) by $var !== null 2012-05-14 01:11:08 -07:00
lang.php Use PHP 5 2013-08-08 17:20:14 -07:00
readme.txt Simplify SQLite development 2017-02-21 13:13:39 +01:00
todo.txt Add a todo 2017-04-09 12:13:18 +02:00

Adminer - Database management in a single PHP file
Adminer Editor - Data manipulation for end-users

https://www.adminer.org/
Supports: MySQL, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB, Firebird
Requirements: PHP 5+
Apache License 2.0 or GPL 2

adminer/index.php - Run development version of Adminer
editor/index.php - Run development version of Adminer Editor
editor/example.php - Example customization
plugins/readme.txt - Plugins for Adminer and Adminer Editor
adminer/plugin.php - Plugin demo
adminer/sqlite.php - Development version of Adminer with SQLite allowed
compile.php - Create a single file version
lang.php - Update translations
tests/selenium.html - Selenium test suite