phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Reid <>
Subject Re: Configuring phoenix.query.dateFormatTimeZone
Date Fri, 14 Aug 2015 13:31:15 GMT
Hi David,

How are you upserting timestamps? The phoenix.query.dateFormatTimeZone
config property only affects string parsing or the TO_DATE function (docs
on this are at [1]). If you're using the TO_DATE function, it's also
possible to supply a custom time zone in the function call (docs on this
are at [2]).

Regardless, if you want to use this setting, you need to update the
hbase-site.xml on the client machine where you're connecting to
HBase/Phoenix. This configuration file will typically be in
/etc/hbase/conf, although if you're using Cloudera Manager (or probably
some other cluster management software) the hbase-site is automatically
overwritten by CM, so you'll need to configure this within Cloudera Manager
itself (via configuration settings called "Gateway safety-valve", or
something along those lines).

In any case, there are often issues due to the odd way in which JDBC itself
handles (or doesn't handle) timezones, so the best way to resolve this
issue is probably for you to post some examples of the statements you're
running, what output you're getting, and what you would expect instead of
what you're getting.

- Gabriel


On Fri, Aug 14, 2015 at 1:59 PM Naor David <> wrote:

> Hello,
> I recently installed Apache Pheonix 4.3 at a Cloudera cluster via parcel
> installation.
> My problem is that while inserting a java.sql.TimeStamp object via jdbc,
> the corresponding inserted timestamp column is converted to GMT+0 timezone.
> (While my local time is GMT+3).
> I understood that one can configure the Phoenix timezone by setting
> phoenix.query.dateFormatTimeZone to the desired timezone.
> My problem is that I don't know which hbase-site.xml should I edit (and
> where can I find it).
> Any help would be appreciated.
> Regards,
> David.

View raw message