#106937TCA Datetime with different outputs depending on the “readonly” status
Description
If you create a datetime entry in the TCA, you get different outputs depending on whether readonly = true or not.
If readonly is true the element render the date with php and add the timezone to the output.(in my case UTC+2)
If readonly is false, the element will display the date in a data attribute that contains the timestamp UTC+0.
Test TCA:
[
'exclude' => true,
'label' => Test',
'config' => [
'type' => 'datetime',
'default' => null,
'size' => 30,
'readOnly' => true,
'dbType' => 'datetime',
'nullable' => true,
],
],
'readOnly' => true, => 19:40 'readOnly' => false => 17:40