[BUGFIX] Correctly treat relative date specification in date-VH
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Format / DateViewHelper.php
index 8a35ee3..309e8ed 100644 (file)
@@ -134,7 +134,7 @@ class DateViewHelper extends AbstractViewHelper implements CompilableInterface {
                }
                if (!$date instanceof \DateTime) {
                        try {
-                               $base = $base instanceof \DateTime ? $base->format('U') : strtotime((MathUtility::canBeInterpretedAsInteger($date) ? '@' : '') . $base);
+                               $base = $base instanceof \DateTime ? $base->format('U') : strtotime((MathUtility::canBeInterpretedAsInteger($base) ? '@' : '') . $base);
                                $dateTimestamp = strtotime((MathUtility::canBeInterpretedAsInteger($date) ? '@' : '') . $date, $base);
                                $date = new \DateTime('@' . $dateTimestamp);
                                $date->setTimezone(new \DateTimeZone(date_default_timezone_get()));