Giter Site home page Giter Site logo

Comments (5)

sanikolaev avatar sanikolaev commented on July 22, 2024

Looks like it considers the entered time is in UTC instead of converting it to UTC internally from the current time zone.

MRE:

mysql> set global timezone='Asia/Novosibirsk'; drop table if exists rt1; create table rt1(tid timestamp); INSERT into rt1 (id, tid) values (3, '2022-01-01T00:00'); SELECT id, date_format(tid, '%Y-%m-%dT%H:%M') from rt1;
--------------
set global timezone='Asia/Novosibirsk'
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
drop table if exists rt1
--------------

Query OK, 0 rows affected (0.08 sec)

--------------
create table rt1(tid timestamp)
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
INSERT into rt1 (id, tid) values (3, '2022-01-01T00:00')
--------------

Query OK, 1 row affected (0.00 sec)

--------------
SELECT id, date_format(tid, '%Y-%m-%dT%H:%M') from rt1
--------------

+------+------------------------------------+
| id   | date_format(tid, '%Y-%m-%dT%H:%M') |
+------+------------------------------------+
|    3 | 2022-01-01T07:00                   |
+------+------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

from manticoresearch.

sanikolaev avatar sanikolaev commented on July 22, 2024

Same with hour():

select hour(tid) from rt1
--------------

+-----------+
| hour(tid) |
+-----------+
|         7 |
+-----------+
1 row in set (0.00 sec)

from manticoresearch.

sanikolaev avatar sanikolaev commented on July 22, 2024

Another failing test is col_434 when run in the columnar mode - https://github.com/manticoresoftware/columnar/runs/24873252849

from manticoresearch.

glookka avatar glookka commented on July 22, 2024

These are actually two unrelated issues. One issue is using UTC instead on local timezone on inserts and another issue is treating quoted timestamps as strings that need to be parsed via cctz

from manticoresearch.

glookka avatar glookka commented on July 22, 2024

Fixed in f6af49b

from manticoresearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.