Bug #8939

format.date does not handle TYPO3/UNIX timestamps

Added by Xavier Perseguers about 5 years ago. Updated almost 5 years ago.

Status:Rejected Start date:2010-07-19
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

0%

Category:ViewHelpers
Target version:-
Has patch: Affected Flow version:

Description

Hi,

I just upgraded an Extbase extensions I developed for TYPO3 4.3 and came across a bug in the format.date ViewHelper. My dates are not displayed anymore as the conversion from unix timestamp to DateTime object is invalid (constructor expects a string representation, not a timestamp).

Enclosed is a patch that solves this issue.

DateViewHelper.diff Magnifier (659 Bytes) Xavier Perseguers, 2010-07-19 15:34

History

#1 Updated by Bastian Waidelich about 5 years ago

  • Status changed from New to Rejected
  • Assigned To set to Bastian Waidelich
  • % Done changed from 80 to 0
  • Branch set to v4 + v5

Hi Xavier,

as you have seen, the format.date ViewHelper internally passes the date argument to the DateTime constructor.
The DateTime constructor accepts Unix timestamps too, but according to
According to http://www.php.net/manual/en/datetime.formats.php -> Compound Formats they have to be prefixed with "@".

See http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-July/005751.html for more information and feel free to re-open this issue if you don't agree or want to discuss this further.

Also available in: Atom PDF