Support Questions

Find answers, ask questions, and share your expertise

Changing timezone in Phoenix Query Server

avatar
Super Collaborator

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

avatar
Expert Contributor

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.

View solution in original post

6 REPLIES 6

avatar

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

avatar
Expert Contributor

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.

avatar
Super Collaborator

Thanks @sbhat

avatar

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

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

avatar
Super Guru

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

avatar
Super Collaborator

Thanks @Josh Elser