[TYPO3-english] Problems with date : U -> strftime

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Tue May 7 16:50:22 CEST 2013


Hello Elmar,

Thanks for your reply.

Concerning
On 7/5/13 2:53 PM, Elmar Hinz wrote:
>> This gives me:
>> donderdag, 1. januari 1970
>>
>
> 1.) IMHO this indicates that 0 is parsed instead of the current time.
>
> To approach the error you could try to output without formatting:
> temp.copyright = TEXT
> temp.copyright.data = date:U
> #      temp.copyright.strftime = %A, %e. %B %Y
>
> Probably 0, but why?

No, this gives:
1367938113

> Try the PHP function directly outside of TYPO3:
> http://php.net/manual/en/function.date.php
>
> 2.) Then you could try to go with strftime alone:
>
> temp.copyright = TEXT
> #   temp.copyright.data = date:U
> temp.copyright.strftime = %A, %e. %B %Y
>
> The PHP function strftime defaults to the current moment when no
> timestamp is given.
> May the same behaviour works with the TS frontend to it.
> More likely it takes 0 as default input, what leads again to your result.
>
> \Elmar

I'll try with PHP directly and let you know.

Thanks and regards,
Bert



More information about the TYPO3-english mailing list