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 12 months ago. Updated 11 months ago.

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

0%

Estimated time:
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',
    ],
];


Files

Screenshot from 2020-05-27 16-26-19.png (9.15 KB) Screenshot from 2020-05-27 16-26-19.png After selecting date, before saving Daniel Siepmann, 2020-05-27 16:26
Screenshot from 2020-05-27 16-26-29.png (9.09 KB) Screenshot from 2020-05-27 16-26-29.png After saving Daniel Siepmann, 2020-05-27 16:26
Screenshot from 2020-06-03 08-51-38.png (10.7 KB) Screenshot from 2020-06-03 08-51-38.png JS Console formatting moment js Daniel Siepmann, 2020-06-03 08:51

Related issues

Related to TYPO3 Core - Bug #79448: Handling dates in the very past inside T3-BackendNew2017-01-24

Actions
#1

Updated by Daniel Siepmann 11 months 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 11 months ago

  • Parent task set to #77562
#3

Updated by Riccardo De Contardi 11 months ago

Maybe related? #79448

#4

Updated by Daniel Siepmann 6 months ago

  • Related to Bug #79448: Handling dates in the very past inside T3-Backend added

Also available in: Atom PDF