#99627Context:class don't detect timezone correctly
Description
I Define in the LocalConfiguration.php my timezone.
If I want to use the current timezone, I have to use the following code. The commented code will give back the timezone ‘UTC’.
$context = GeneralUtility::makeInstance(Context::class);
$nowStamp = $context->getPropertyFromAspect('date','timestamp');
// $timeZone = $context->getPropertyFromAspect('date','timezone'); // TYPO3 bug
$timeZone = date_default_timezone_get();
Contains the Context:classs a bug?
P.S. I got the idea to use `date_default_timezone_get()` from the f:format.date-viewhelper, which didn`t use the context-class for detecting the timezone. It use the Context:class only for the detection of the current timestamp.
Reviews 6
- 11.5 83757[BUGFIX] Cast simulated timestamp to int
- 12.4 83756[BUGFIX] Cast simulated timestamp to int
- main 83742[BUGFIX] Cast simulated timestamp to int
- 11.5 83684[BUGFIX] Use correct timezones with timestamp based \DateTime
- 12.4 83682[BUGFIX] Use correct timezones with timestamp based \DateTime
- main 81915[BUGFIX] Use correct timezones with timestamp based \DateTime