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

Konstantin Orlov updated IGNITE-22780:
--------------------------------------
    Fix Version/s: 3.0.0-beta2

> 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
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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