Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7928

MySQL time is not aware of timezone settings

    XMLWordPrintable

Details

    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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            keravecv Vincent Kéravec
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.