phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <els...@apache.org>
Subject [DISCUSS] TimeZone handling (PHOENIX-5066)
Date Tue, 02 Jun 2020 15:41:42 GMT
Hiya,

Richard (and Istvan) had a chat with me the other day about the change 
Richard has started making here.

Given what I know so far, I think Richard is trying to fix a 
long-standing "it just is that way"-ism from Phoenix.

Please give it a glance and make sure we're working towards a proper 
long-term fix :). Thanks!


-------- Forwarded Message --------
Subject: [jira] [Comment Edited] (PHOENIX-5066) The TimeZone is 
incorrectly used during writing or reading data
Date: Tue, 2 Jun 2020 12:51:00 +0000 (UTC)
From: Richard Antal (Jira) <jira@apache.org>
To: elserj@apache.org


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

]
Richard Antal edited comment on PHOENIX-5066 at 6/2/20, 12:50 PM:
------------------------------------------------------------------

I created a [pull request|[https://github.com/apache/phoenix/pull/796]] 
to make it easier to see the differences.
  In the latest patch I changed the static functions in the DateUtil 
class to non static. We can get the DateUtil instance by calling the 
getDateUtilContext on PhoenixConnection, this way we can set the 
timezone attribute for the DateUtil when we create the connection and 
use it later.

This change looks huge because DateUtil was replaced to 
getDateUtilContext everywhere.

There are lot of failing tests outside of GMT time zones, because this 
patch introduces a new behaviour for timezone handling. Strings that are 
parsed to time are not interpreted in GMT/UTC but in local timezone and 
we store the data in GMT or in QueryServices.DATE_FORMAT_TIMEZONE_ATTRIB 
if that is set to some other value.

I would like to hear other opinions about this change before doing any 
further modification.



Mime
View raw message