Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5537

Issue when using Month or Year paired with convert_tz of an attribute

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I am running sql query fetching month and year of a created_at field in a table and i get wrong month and year result
      MariaDB [fit_fix_analytics]> select CONVERT_TZ(created_at, '+00:00', '+03:00') as date, YEAR(CONVERT_TZ(created_at, '+00:00', '+03:00')) as year, MONTH(CONVERT_TZ(created_at, '+00:00', '+03:00')) as month from table limit 10;
      ------------------------------

      date year month

      ------------------------------

      2020-09-11 00:36:58 0 1
      2020-09-11 01:03:49 0 1
      2020-09-11 01:30:08 0 1
      2020-09-11 01:41:44 0 1
      2020-09-11 21:14:55 0 1
      2020-09-11 21:15:54 0 1
      2020-09-11 21:18:36 0 1
      2020-09-11 21:21:15 0 1
      2020-09-12 22:10:58 0 1
      2020-09-13 11:57:37 0 1

      ------------------------------

      Attachments

        Activity

          People

            Unassigned Unassigned
            khaledheshamfathallah Khaled Hesham
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.