Bug #88797

renderType inputDateTime with different eval for types changes time after every saving

Added by Chris Müller about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2019-07-18
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Given is following TCA fragment:

'columns' => [
    'timestamp' => [
        'config' => [
            'type' => 'input',
            'renderType' => 'inputDateTime',
            'eval' => 'timesec',
        ],
    ],
],
'types' => [
    '2' => [
        'columnsOverrides' => [
            'timestamp' => [
                'config' => [
                    'eval' => 'datetime',
                ],
            ],
        ],
    ]
],

The default wizard for (Date)Time is only to show the time. When selecting, e.g., 06:00:00 and storing it, it is correctly shown again after saving.

Now using type 2 with DateTime. When selecting 2019-07-18 06:00:00 and storing it, the datetime is shown as 2019-07-18 08:00:00 after saving. Another saving and the datetime is now 2019-07-18 10:00:00.

Okay, let's switch the eval configuration:

'columns' => [
    'timestamp' => [
        'config' => [
            'type' => 'input',
            'renderType' => 'inputDateTime',
            'eval' => 'datetime',
        ],
    ],
],
'types' => [
    '2' => [
        'columnsOverrides' => [
            'timestamp' => [
                'config' => [
                    'eval' => 'timesec',
                ],
            ],
        ],
    ]
],

Saving the datetime field, the datetime is shown correctly after saving. But now the timesec field is counting down: from 06:00:00 to 05:00:00 to 04:00:00 and so on for every saving.

There seems to be a problem with the timezone handling with this rare use case.

Also available in: Atom PDF