You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Alex Batyrshin (Jira)" <ji...@apache.org> on 2019/11/11 10:00:00 UTC

[jira] [Created] (PHOENIX-5567) Incorrect time zones for convert_tz()

Alex Batyrshin created PHOENIX-5567:
---------------------------------------

             Summary: Incorrect time zones for convert_tz()
                 Key: PHOENIX-5567
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5567
             Project: Phoenix
          Issue Type: Bug
            Reporter: Alex Batyrshin


Looks like convert_tz() uses incorrect (old) timezone information for 'Europe/Moscow'.

From October 2014 time zone in Moscow is *always*: UTC+03:00, but Phoenix convert summer/winter times to different offset.
Test cast:
{code:java}
0: jdbc:phoenix:10.73.67.148> select dt as as_is, convert_tz(dt, 'UTC', 'Europe/Moscow') from (select to_timestamp('2019-01-01') dt);
+--------------------------+---------------------------------+
|          AS_IS           | DATE '2019-01-01 03:00:00.000'  |
+--------------------------+---------------------------------+
| 2019-01-01 00:00:00.000  | 2019-01-01 03:00:00.000         |
+--------------------------+---------------------------------+
1 row selected (0.003 seconds)
0: jdbc:phoenix:10.73.67.148> select dt as as_is, convert_tz(dt, 'UTC', 'Europe/Moscow') from (select to_timestamp('2019-07-01') dt);
+--------------------------+---------------------------------+
|          AS_IS           | DATE '2019-07-01 04:00:00.000'  |
+--------------------------+---------------------------------+
| 2019-07-01 00:00:00.000  | 2019-07-01 04:00:00.000         |
+--------------------------+---------------------------------+
1 row selected (0.004 seconds)

{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)