Hello,
i have a bean method that returns a date object to the jsp page.
public Date getTestDate() {
System.out.println("returning current login date: "
+user.getLastSuccessfulLogin().getLoginDate());
return user.getLastSuccessfulLogin().getLoginDate();
}
the output of this method is:
returning current login date:
Sun Apr 30 03:57:35CEST 2006
now the jsp side
testdate jstl:
<fmt:formatDate value="${memberDisplayBean.testDate}" pattern="dd.MM.yyyy HH:mm:ss" />
<br />
testdate jsf:
<h:outputText value="#{memberDisplayBean.testDate}">
<f:convertDateTime pattern="dd.MM.yyyy HH:mm:ss" />
</h:outputText>
the output is :
testdate jstl: 30.04.2006 03:57:35
testdate jsf: 30.04.2006 01:57:35
while jstl works fine , jsf makes problem and substracts 2 hours.
Why is it behaving this way.
annotation why is
<h:outputText value="#{memberDisplayBean.testDate}">
<f:convertDateTime pattern="dd.MM.yyyy HH:mm:ss" locale="de"/>
</h:outputText>
coursing an error , "de" is a valid language code