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

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

    [ https://issues.apache.org/jira/browse/PHOENIX-5567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971439#comment-16971439 ] 

Alex Batyrshin edited comment on PHOENIX-5567 at 11/11/19 10:37 AM:
--------------------------------------------------------------------

Iv already tried to update jre by TZUpdater tool without success - [https://www.oracle.com/technetwork/java/javase/documentation/tzupdater-readme-136440.html]

As i see Phoenix uses org.joda.time.DateTimeZone - [https://github.com/apache/phoenix/blob/4.14-HBase-1.4/phoenix-core/src/main/java/org/apache/phoenix/expression/function/ConvertTimezoneFunction.java]

From Joda documentation looks like TZ compiled into jars - "Joda-Time also compiles the time zone data into our jar file. However, the key difference is that you can update the raw data and recompile the jar at any time"  [https://www.joda.org/joda-time/tz_update.html]

 

Looks like Phoenix need recent Joda package


was (Author: 0x62ash):
Iv already tried to update jre by TZUpdater tool - [https://www.oracle.com/technetwork/java/javase/documentation/tzupdater-readme-136440.html]


As i see Phoenix uses org.joda.time.DateTimeZone - [https://github.com/apache/phoenix/blob/4.14-HBase-1.4/phoenix-core/src/main/java/org/apache/phoenix/expression/function/ConvertTimezoneFunction.java]

From Joda documentation looks like TZ compiled into jars - "Joda-Time also compiles the time zone data into our jar file. However, the key difference is that you can update the raw data and recompile the jar at any time"  [https://www.joda.org/joda-time/tz_update.html]

 

Looks like Phoenix need recent Joda package

> Incorrect time zones for convert_tz()
> -------------------------------------
>
>                 Key: PHOENIX-5567
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5567
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.2
>            Reporter: Alex Batyrshin
>            Priority: Major
>
> 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)