Bug #38544

Unit test for TypoScript\Processors\DateProcessorTest::dateBasicallyWorks fails

Added by Adrian Föder about 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-07-02
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:TypoScript
Target version:-

Description

Time: 1 second, Memory: 5.50Mb

There was 1 failure:

1) TYPO3\TYPO3\TypoScript\Processors\DateProcessorTest::dateBasicallyWorks
The TypoScript processor "date" did not return the expected result while
converting a UNIX timestamp. Expected "July 24, 2007, 2:25 pm" but got
"July 24, 2007, 12:25 pm" 
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'July 24, 2007, 2:25 pm'
+'July 24, 2007, 12:25 pm'

/var/www/Packages/Application/TYPO3.TYPO3/Tests/Unit/TypoScript/Processors/DateProcessorTest.php:43
/var/www/Packages/Framework/TYPO3.FLOW3/Tests/BaseTestCase.php:50

Associated revisions

Revision b63620f3
Added by Adrian Föder almost 3 years ago

[!!!][BUGFIX] TypoScript date processor adjusted to correct time zone handling

With its former implementation the Date processor of TypoScript relied
strictly on the system's time zone, which is incorrect when
parsing Unix timestamps because these are per design GMT+00:00.

However, if desired, a timezone correction can be applied with a provided
setTimezone setter method.

This change is considered breaking because having relied on the behavior
(i.e. taking system timezone into account) would change the expectation now.

Change-Id: I1c34e3a8c213e59fb3a3c1ea6b33687411ba9d79
Fixes: #38544

History

#1 Updated by Karsten Dambekalns about 3 years ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Karsten Dambekalns

Works for (hehe) - what timezone is your PHP using?

#2 Updated by Adrian Föder about 3 years ago

hah sorry; I seldom realize that there is a feedback needed from me; I use (hehe) UTC ;-)

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13080

#4 Updated by Adrian Föder about 3 years ago

  • Status changed from Needs Feedback to Under Review

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13080

#6 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13080

#7 Updated by Gerrit Code Review almost 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13080

#8 Updated by Gerrit Code Review almost 3 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13080

#9 Updated by Aske Ertmann over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF