Hallo Bernd,
yes i think also this is a timezone problem.
when adding a 'timzone="CEST"' to the converter the time is stable but
wrong.
I added logging to bean getter and setter:
getter says 'Di Sep 20 22:44:41 CEST 2005' but on page i have '20:44'.
Omitting timezone displays the time correct but increments on each submit.
So you don't think i'm doing something wrong using this converter?
I will try tomorrow patching getAsString to use getTimeZone().
Bye
Bernd Bohmann wrote:
> Hello Volker,
>
> i think it's a timezone issue.
> If you look at DateTimeConverter you see getAsObject and getAsString
> are't symmetric.
>
> getAsObject
>
> DateFormat format = getDateFormat();
> TimeZone tz = getTimeZone();
> if( tz != null )
> format.setTimeZone( tz );
>
>
> getAsString
>
> DateFormat format = getDateFormat();
> if (_timeZone != null)
> {
> format.setTimeZone(_timeZone);
> }
>
> getTimeZone returns as default GMT
>
> the last log entry is:
>
> Fixes MYFACES-506. Now the default time for the GMT zone is returned in
> DateTimeConverter.getTimeZone if none is set.
>
> Either getAsString should use getTimeZone or the fix should be reverted.
>
> Can you test this with setting the timezone in convertDateTime.
>
>
> Good Night
>
>
> Bernd
>
>
>
>
>
>
> Volker Weber wrote:
>
>> Hello,
>>
>> i have a problem with the f:convertDateTime:
>>
>> if i have a simple h:outputText with an attached f:convertDateTime where
>> only pattern is set (to "HH:mm") the convertToObject goes wrong.
>>
>> For testing i'm using the date.jsp in simple expamles from svn current.
>>
>> I add
>>
>> <h:inputText value="#{date3}" >
>> <f:convertDateTime pattern="HH:mm"/>
>> </h:inputText>
>>
>> and remove the t:inputDate referencing date3.
>>
>> now every time i pressing the submit button the hour is incremented by
>> one.
>>
>> Is this a bug, or what i'm doing wrong?
>>
>>
>
>
--
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.