Issue Bug Closed

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

Chris Müller 07/18/19, 22:06 updated 02/06/26, 16:20

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 1

  1. Georg Ringer commented and changed status New Closed 02/06/26, 16:20

    this has been fixed in recent bugfix releases – imho also in v13 but tested in v14 only.