Calender.getTime is displaying wrong date(One day earlier then the current)

I am trying to display date from a calender object. My code is

<h:outputText value="#{documentActivity.createdDate.time}" />

createdDate is a calender object.

this output is wrong, if the date is 05/28/07, this displays as 05/27/07.

When I try to print the same from a java class it prints fine...

createdDate.getTime().

Has anyone faced this issue, Is there a problem with the JSF tag?

[435 byte] By [cloudydaysa] at [2007-11-27 5:39:30]
# 1
as I know JSF automatically localize ur pages. usually it takes DateTime from the client machine and it covert it to server date time. think bit about locale, some times it may help you.Rohitha
Rohithadga at 2007-7-12 15:14:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

[nobr]Which JSF version? Do you use a converter?

I can't reproduce it here in 1.2_04 with the following basic snippets:<h:outputText value="#{myBean.date}" /><br>

<h:outputText value="#{myBean.calendar.time}" /><br>

<h:outputText value="#{myBean.date}"><f:convertDateTime/></h:outputText><br>

<h:outputText value="#{myBean.calendar.time}"><f:convertDateTime/></h:outputText><br>

MyBeanpublic Date getDate() {

return new Date();

}

public Calendar getCalendar() {

return Calendar.getInstance();

}

It all shows valid dates.[/nobr]

BalusCa at 2007-7-12 15:14:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...