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

FROM_UNIXTIME same date time from two different timestamp

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.23-galera
    • N/A
    • Temporal Types
    • None
    • CentOS 64 bit

    Description

      I am having a weird problem with mariadb. I am using FROM_UNIXTIME to convert timestamp to datetime. The problem is two different timestamp is resulting to same datetime. How can it be possible?

      Here what I got from mariadb-

      SELECT from_unixtime( '1456017720' ) , from_unixtime( '1456021320' )

      Output on my timezone-

      2016-02-20 23:22:00 2016-02-20 23:22:00

      Another example:

      SELECT from_unixtime( '1456016700' ) , from_unixtime( '1456020300' ) 

      Output on my timezone-

      2016-02-20 23:05:00 2016-02-20 23:05:00

      This is wrong because no two different timestamp should return same date time.

      I have attached screenshot proof of output that I got via phpmyadmin.

      Version info-

      innodb_version 5.6.26-76.0 
      protocol_version 10 
      slave_type_conversions version 10.0.23-MariaDB 
      version_comment MariaDB Server 
      version_compile_machine x86_64 
      version_compile_os Linux 
      version_malloc_library bundled jemalloc

      Attachments

        1. image.png
          22 kB
          Enne Fayen
        2. image2.png
          13 kB
          Enne Fayen

        Activity

          People

            serg Sergei Golubchik
            ennfenn Enne Fayen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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