Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 07-28-2016 01:54 AM
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
Created 07-28-2016 10:02 AM
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.
Created 07-28-2016 08:46 AM
can you check, updated configuration(hbase-site.xml) should be in the classpath of phoenix query server also?
Created 07-28-2016 10:02 AM
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.
Created 08-02-2016 01:14 AM
Thanks @sbhat
Created 02-21-2017 12:40 PM
Anyone did follow this answer and still got the same issue?
I added custom hbase-site in Ambari, but timezone wasn't changed. 😞
Created 08-01-2016 08:33 PM
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
Created 08-02-2016 01:14 AM
Thanks @Josh Elser