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

Alex Batyrshin commented on PHOENIX-5567:
-----------------------------------------

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)

Reply via email to