[TYPO3-english] Content element date

André Hänsel andre at webkr.de
Thu Apr 16 00:20:59 CEST 2009


Hi,

I am using the "date" field to display a date above the header of my content 
elements.

After I switched servers and upgraded to 4.2.3 the dates were all 01/01/70. 
I tracked it down to the fact that apparently the date is put throug the PHP 
date() function twice, the first time using my configured "date" property 
(of "d.m.Y") and the second time always using d/m/Y, which lead to 
1239830148 -> 15.04.2009 (== 15) -> 01/01/70.

I re-created lib.stdheader in my template using the following TS:
lib.stdheader.5 >
lib.stdheader.5 = TEXT
lib.stdheader.5.field = date
lib.stdheader.5.date = d.m.Y
lib.stdheader.5.if.isTrue.field = date
lib.stdheader.5.wrap = <p class="csc-header-date">|</p>
lib.stdheader.5.prefixComment = 2 | Header date:

And now it works!

The TS causes absolutely no change to the tree in the TSOB, but it does so 
in the frontend rendering. What's going on here?

Regards,
André 




More information about the TYPO3-english mailing list