Reputation: 855
I am trying to display the date from my DB (which is mysql). And it shows all the dates correctly except one date. When displaying the last day of the year (31st December), the day and month values are correct but the year value shows the next year.
This is my code:
<h:outputText value="#{bean.date}" >
<f:convertDateTime pattern="dd/MM/YYYY"/>
</h:outputText>
And in my web.xml
file I have this code:
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
For 31/12/2013, it shows 31/12/2014 and this is the same for all years.
How can I solve this?
Thanks.
Upvotes: 6
Views: 692