You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andreas Ernst <ae...@ae-online.de> on 2012/10/09 10:24:45 UTC

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

Re:

Posted by Andreas Ernst <ae...@ae-online.de>.
Hi Thomas,

Am 09.10.2012 10:45, schrieb Ing. Thomas Kernstock:
> 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

thanks for your reply.

Nevertheless, i never ever considered about the timezone, when i 
converted a date or timestamp (ISO to locale DE).

This is a total annoying issue, because you expect the local timezone.

Regards
Andreas
-- 
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

AW:

Posted by "Ing. Thomas Kernstock" <t....@e-technologies.at>.
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