Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL)
-
None
-
Linux
Description
MySQL is not timezone aware while calculating time.
Link to a related MySQL bug http://bugs.mysql.com/bug.php?id=68832
MariaDB [(none)]> select @@session.time_zone;
|
| @@session.time_zone |
|
| Europe/Oslo |
|
1 row in set (0.00 sec)
|
|
MariaDB [(none)]> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2015-03-29 02:00:00'));
|
| FROM_UNIXTIME(UNIX_TIMESTAMP('2015-03-29 02:00:00')) |
|
| 2015-03-29 03:00:00 |
|
1 row in set (0.00 sec)
|
|
MariaDB [(none)]> SELECT CAST('2015-03-29 02:00:00' as DATETIME);
|
| CAST('2015-03-29 02:00:00' as DATETIME) |
|
| 2015-03-29 02:00:00 |
|
1 row in set (0.00 sec)
|
MariaDB [(none)]> SELECT CAST('2015-03-29 01:00:01' as DATETIME)+INTERVAL 1 HOUR;
|
| CAST('2015-03-29 01:00:01' as DATETIME)+INTERVAL 1 HOUR |
|
| 2015-03-29 02:00:01 |
|
1 row in set (0.00 sec)
|
|
MariaDB [(none)]> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2015-03-29 01:00:01')+3600);
|
| FROM_UNIXTIME(UNIX_TIMESTAMP('2015-03-29 01:00:01')+3600) |
|
| 2015-03-29 03:00:01 |
|
1 row in set (0.00 sec)
|