Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Changing timezone in Phoenix Query Server

Solved Go to solution

Changing timezone in Phoenix Query Server

Expert Contributor

Hi!

Sorry for a newbie question, but I just want to ask on how to change timezone on Phoenix.

Right now, by default it is set to GMT, and would like to change it to GMT+8.

Already tried to use this param below to Hbase, custom hbase-site.

phoenix.query.dateFormatTimeZone=GMT+08:00

But, still no luck.

Thanks in advance!

Best regards,

MD

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Changing timezone in Phoenix Query Server

Rising Star

Hi @Michael Dennis "MD" Uanang : You can check here http://stackoverflow.com/questions/14326308/how-to-include-hbase-site-xml-in-the-classpath to ensure hbase-site.xml changes are picked.

Alternately, if you are using ambari, you could add the property in the hbase service. Go to HBASE -> Configs ->

Custom hbase-site. Add the property phoenix.query.dateFormatTimeZone with value GMT+08:00. You may have to restart dependent services.

6 REPLIES 6

Re: Changing timezone in Phoenix Query Server

can you check, updated configuration(hbase-site.xml) should be in the classpath of phoenix query server also?

Re: Changing timezone in Phoenix Query Server

Rising Star

Hi @Michael Dennis "MD" Uanang : You can check here http://stackoverflow.com/questions/14326308/how-to-include-hbase-site-xml-in-the-classpath to ensure hbase-site.xml changes are picked.

Alternately, if you are using ambari, you could add the property in the hbase service. Go to HBASE -> Configs ->

Custom hbase-site. Add the property phoenix.query.dateFormatTimeZone with value GMT+08:00. You may have to restart dependent services.

Re: Changing timezone in Phoenix Query Server

Expert Contributor

Thanks @sbhat

Re: Changing timezone in Phoenix Query Server

New Contributor

Anyone did follow this answer and still got the same issue?

I added custom hbase-site in Ambari, but timezone wasn't changed. :-(

Re: Changing timezone in Phoenix Query Server

You might be able to change this in the client itself using the "timeZone" option in the Phoenix Thin Driver's JDBC URL:

http://calcite.apache.org/avatica/docs/client_reference.html#timeZone

Re: Changing timezone in Phoenix Query Server

Expert Contributor

Thanks @Josh Elser