Hi,
the javadoc says:
public java.util.TimeZone getTimeZone()
Return the TimeZone used to interpret a time value. If not
explicitly set, the default time zone of GMT returned.
so we can't change this.
but i think (now) the patch we applied last week was the wrong solution.
Instead of changing getAsString() to use getTimeZone() for setting the
timeZone to the DateFormat, getAsObject() shouldn't do this.
Of cause getAsString() and getAsObject() must use the same TimeZone,
which was not the case last week.
The following is taken and light modified from date.jsp in simple example:
<h:inputText value="#{date3}">
<f:convertDateTime type="both"/>
</h:inputText>
<f:verbatim><br></f:verbatim>
<h:outputText value="#{example_messages['date_comp_text6']} #{date3}"/>
The time differs in <h:inputText ../> and <h:outputText ../> cause of
the GMT default in the converter. And around midnight also the date may
differ.
I'm shure this is not the expected behavior. But i'm not shure if this
is not a problem in the h:outputText, shoudn't there also used the
converter to convert the java.util.Date to string?
But to be in sync with output generated by jsp the converter shoudn't
use getTimeZone() but _timeZone.
We should undo the patch from last week and change getAsObject()
accordingly.
ir. ing. Jan Dockx wrote:
> I believe the default is the cause of all problems. I think the default
> needs to be the systems time zone. But not sure yet.
>
>
> On 29 Sep 2005, at 22:54, Mike Kienenberger wrote:
>
> This sounded vaguely familiar. I think it's been fixed.
>
> http://issues.apache.org/jira/browse/MYFACES-506?page=all
> DateTimeConverter.getTimeZone should return the default time of the
> GMT zone by default
>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.