[ 
https://issues.apache.org/jira/browse/IGNITE-22780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Orlov reassigned IGNITE-22780:
-----------------------------------------

    Assignee: Konstantin Orlov

> Sql. Cast from VARCHAR to TS WITH LOCAL TZ doesn't take into account time zone
> ------------------------------------------------------------------------------
>
>                 Key: IGNITE-22780
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22780
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Konstantin Orlov
>            Assignee: Konstantin Orlov
>            Priority: Major
>              Labels: ignite-3
>
> Let's take a look at case below:
> {code:java}
>         sql("CREATE TABLE tmp (id INT PRIMARY KEY, s VARCHAR(100))");
>         sql("INSERT INTO tmp VALUES (1, '1970-01-01 12:00:00')");
>         ZoneId zone = ZoneOffset.ofHours(4);
>         assertQuery("INSERT INTO test SELECT s FROM tmp WHERE id = 1")
>                 .withTimeZoneId(zone)
>                 .check();
>         assertQuery("SELECT * FROM test")
>                 .returns(Instant.parse("1970-01-01T08:00:00Z"))
>                 .check();
> {code}
> Although client which does INSERT with implicit cast from VARCHAR to TS WITH 
> LOCAL TZ has zone offset of +4 hours, last query returns 
> {{1970-01-01T12:00:00Z}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to