I have been using primefaces
6.2.RC2 and in one of my pages I need to show a clock with seconds ticking every second for the set timezone. For this I have been trying to use p:clock
as shown below. The problem I am seeing is that when my timezone is set to EST, it still shows CST time. Looks like the timezone attribute is not working with whatever values set:
<p:clock pattern="HH:mm:ss" mode="server" timeZone="#{loginBean.timezone}"/>
Even I have tried using f.convertDateTime
and that is also not working for the <p:clock/>
. Is there any solution to fix this issue?
Did you try America/New_York as the timezone? EST is UTC - 5 hours. America/New_York is EST in the winter and EDT in the summer, so right now New York is UTC - 4 hours.