Bug #91508

Epic #77562: Misbehaviors with datetime values and timezones

It is not possible to save "negative" dates, e.g. a year before jesus christus with date inputs

Added by Daniel Siepmann about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2020-05-27
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Example setup to reproduce:

1. raise storage for field:

CREATE TABLE tt_content (
    starttime bigint,
);

2. Select an date before year 0.
3. Save
4. You'll see the same year but after 0, not before 0.

The same happens when changing the setup of the field:


$GLOBALS['TCA']['tt_content']['columns']['starttime'] = [
    'exclude' => 0,
    'label' => 'Some year',
    'config' => [
        'type' => 'input',
        'renderType' => 'inputDateTime',
        'eval' => 'date, int, required',
    ],
];

Screenshot from 2020-05-27 16-26-19.png View - After selecting date, before saving (9.15 KB) Daniel Siepmann, 2020-05-27 16:26

Screenshot from 2020-05-27 16-26-29.png View - After saving (9.09 KB) Daniel Siepmann, 2020-05-27 16:26

Screenshot from 2020-06-03 08-51-38.png View - JS Console formatting moment js (10.7 KB) Daniel Siepmann, 2020-06-03 08:51

History

#1 Updated by Daniel Siepmann about 1 month ago

Digging deeper, I found out that TYPO3/CMS/Backend/FormEngineValidation is converting the year into positive year already inside FormEngineValidation.updateInputField.

When faking and overwriting the values in this method, moment js will still format the year as positive year.

#2 Updated by Riccardo De Contardi about 1 month ago

  • Parent task set to #77562

#3 Updated by Riccardo De Contardi about 1 month ago

Maybe related? #79448

Also available in: Atom PDF