ekimas
ekimas

Reputation: 548

TYPO3 10.4 error #1470230767 "Out of range value for column 'crdate' at row 1"

I have got this error while I am trying to edit frontend user account. It tries to save 'crdate' as -3600 when it is

crdate int(11) unsigned DEFAULT '0' NOT NULL,
    'crdate' => [
        'exclude' => 1,
        'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' .
            'fe_users.crdate',
        'config' => [
            'type' => 'input',
            'renderType' => 'inputDateTime',
            'size' => 30,
            'eval' => 'datetime',
            'readOnly' => true,
            'default' => time()
        ]
    ],

I have got also timezone set up in AdditionalConfiguration.php

$GLOBALS['TYPO3_CONF_VARS']['SYS']['phpTimeZone'] = 'GTM+1';

Is there any another solution than changing GTM+1 -> UTC, because it can cause changes in dates?

Upvotes: 0

Views: 631

Answers (2)

Lasse
Lasse

Reputation: 1

This most likely happens due to a missing crdate in the database.

When it is empty the femanager generates a new timestamp with the date "01.01.1970" which internally generates -3600. Since the database field is unsigned, this will fail.

This should be fixed in the Extension, but as a workaround one could set crdate to any value higher than 0.

Upvotes: 0

David
David

Reputation: 6084

Obviously there is something wrong, either in EXT:femanager or the TYPO3 core.
Any conversion from the database can't be expected as it's no date or time field of any kind. So conversion, in detail subtraction of the one hour from the current time, has to be done in the extension or more likely in the TYPO3 core code. To save the -3600 you could turn the definition of the field to
crdate int(11) DEFAULT '0' NOT NULL, or to
crdate int(12) DEFAULT '0' NOT NULL, (adding one place for the minus when all 11 places are used by digits).

Nevertheless that's likely not what you want to save, so the best is to report the bug on https://forge.typo3.org/issues/.

For the moment you could remove the configuration of the timezone in AdditionalConfiguration.php for being able to work again.

Upvotes: 1

Related Questions