Important: #92736 - Return timestamp as integer in DateTimeAspect
See forge#92736
Description
The
Date, introduced to supersede the use of superglobals like
$GLOBALS can be used to retrieve the current timestamp.
$context = GeneralUtility::makeInstance(Context::class);
// Used instead of $GLOBALS['EXEC_TIME']
$currentTimestamp = $context->getPropertyFromAspect('date', 'timestamp');
Copied!
This timestamp is now correctly returned as
int instead of
string.
Therefore, extension authors should check if they currently rely on receiving
the timestamp as
string and if so, adjust the consuming code accordingly.