Project

General

Profile

Actions

Task #94308

closed

f:format.date should use $GLOBALS['EXEC_TIME'] instead of 'now'

Added by Dieter Porth almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2021-06-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
8.0
Tags:
Complexity:
Sprint Focus:

Description

The 'now' attribute in the DataTime-Object of PHP Function depends on the internal clock.
Two Viewhelper may show the different time like in this example


$first = new DateTime('now');

sleep(2);
$second = new DateTime('now');
echo($first->format("Y-m-d H:i:s"));
echo("\n");
echo($second->format("Y-m-d H:i:s"));

If the date-parameter is an empty string, TYPO3 should use
$date = $GLOBALS['EXEC_TIME'] ?? time();
instead of
$date = 'now';.

If this is fixed, the documentation should changed, too.


Files

local_history1.patch (789 Bytes) local_history1.patch Dieter Porth, 2021-06-11 07:59
Actions #1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72657

Actions #2

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72678

Actions #3

Updated by Benni Mack over 2 years ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF