myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ing. Thomas Kernstock" <t.kernst...@e-technologies.at>
Subject AW: <f:convertDateTime pattern="dd.MM.yyyy" />
Date Tue, 09 Oct 2012 08:45:04 GMT
Hi Andreas,

this is not a bug in myfaces. You have to consider the timezone converting a timestamp/date
! 

Look here: http://stackoverflow.com/questions/2689245/fconvertdatetime-displays-wrong-date



br
Thomas

-----Urspr√ľngliche Nachricht-----
Von: Andreas Ernst [mailto:ae@ae-online.de] 
Gesendet: Dienstag, 09. Oktober 2012 10:25
An: users@myfaces.apache.org
Betreff: <f:convertDateTime pattern="dd.MM.yyyy" />

Hi,

it seems that there is a bug in MyFaces (Bundle-Name: Mojarra JSF Implementation 2.1.1 (20110408-FCS))
shipped with NetBeans 7.2.

I got a Maven based web project with MySQL.

---- code snippet ----
<h:column>
   <f:facet name="header">
     <h:outputText value="#{bundle.ListAusgabenTitle_datum}"/>
   </f:facet>
   <h:outputText value="#{item.datum}">
     <f:convertDateTime pattern="dd.MM.yyyy" />
   </h:outputText>
</h:column>
<h:column>
   <f:facet name="header">
     <h:outputText value="#{bundle.ListAusgabenTitle_datum}"/>
   </f:facet>
   <h:outputText value="#{item.datum}"/> </h:column>
---- code snippet ----

The database field is java.sql.Date with the value 2012-10-02.

unformated output: Tue Oct 02 00:00:00 CEST 2012 f:convertDateTime output: 01.10.2012

for locale de

I hope i am right here, if not drop me a note.

Regards Andreas

Ref: http://netbeans.org/bugzilla/show_bug.cgi?id=219602
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
ae@ae-online.de | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de

Mime
View raw message