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?




--
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333

Reply via email to