Bug #77935
closedtime field in TCA is rendered in FE with an excess of 1 hour
0%
Description
Hi there,
I have a time field in backend (see TCA configuration for it bellow) and if I choose for example 10:00 it renders 11:00 in FE. Data is stored as timestamp in the database and I use FormatDateViehelper to render it.
TCA configuration :
'finish_time' => [ 'label' => 'Finish time', 'config' => [ 'type' => 'input', 'size' => 8, 'max' => 20, 'eval' => 'time', 'default' => 3600 ] ],
ext_tables.sql entry :
CREATE TABLE tx_myext_domain_model_mymodel ( finish_date int(11) unsigned DEFAULT '0' NOT NULL, );
Model :
/** * @var \DateTime * @validate DateTime, NotEmpty */ protected $finishTime = null;
Render method :
<f:format.date format="%H:%M">{mymodel.finishTime}</f:format.date>
Can someone confirm this bug?
Thank you,
Jérémie
Updated by Mona Muzaffar about 7 years ago
- Related to Epic #80852: Datetime handling in backend added
Updated by Markus Klein almost 7 years ago
- Target version deleted (
next-patchlevel) - Parent task set to #77562
Updated by Markus Klein almost 7 years ago
- Status changed from New to Rejected
This is actually no real timestamp which is stored in DB, but only the seconds.
The subtle difference is that timestamps are UTC by definition, hence the format.date viewhelper will adjust the value to the current timezone.
So the behaviour is in the sense correct.
It is impossible to change the database value in a released version.
The only solution I can propose is to use a dedicated VH, which uses the \TYPO3\CMS\Backend\Utility\BackendUtility::time
function to render the time.
Updated by Riccardo De Contardi almost 7 years ago
- Related to deleted (Epic #80852: Datetime handling in backend)