Evgeny Stanilovsky created IGNITE-19274:
-------------------------------------------

             Summary: Sql. Jdbc side working with TIMESTAMP WITH LOCAL TIME 
ZONE did not take into account current tz while storing data.
                 Key: IGNITE-19274
                 URL: https://issues.apache.org/jira/browse/IGNITE-19274
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 3.0.0-beta1
            Reporter: Evgeny Stanilovsky


The {{TIMESTAMP WITH LOCAL TIME ZONE}} data type is a variant of {{TIMESTAMP}} 
that includes a time zone offset in its value. Data stored in the database is 
normalized to the database time zone (UTC) and time zone offset is not stored 
as part of the column data. When the data is retrieved, it to be returned in 
the user's local session time zone.

i.e:
{noformat}
CREATE TABLE timestamp(ts TIMESTAMP, t_tz TIMESTAMP WITH TIME ZONE);
SET TIME ZONE 'tz1';
INSERT INTO timestamp VALUES ('2011-01-01 01:01:01', TIMESTAMP WITH TIME ZONE 
'2011-01-01 01:01:01');
SET TIME ZONE 'tz2';
INSERT INTO timestamp VALUES ('2011-01-01 01:01:01', TIMESTAMP WITH TIME ZONE 
'2011-01-01 01:01:01');
...
select * from timestamp;{noformat}
returned rows need to be different in case of different tz1 and tz2 offsets but 
they are equals for now. Also returned representation need to be present in 
user session time zone.



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

Reply via email to