Project

General

Profile

Actions

Bug #68579

closed

TCA field of type time saves different data in database

Added by Markus Klein almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2015-07-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

Description

In 6.2 a field of type "time" stored the number of seconds for a given time.

12:30 was stored as "45000"

One could use the \TYPO3\CMS\Backend\Utility\BackendUtility::time() method to render the time.

Currently the specified time is stored as seconds "on the current day", which kills any business logic expecting the original values.

12:30 is now stored as "1438086600"

I'm not sure if this was introduced with 7.3 or even earlier

After fixing this bug, we need an upgrade wizard to fix all time fields in DB which contain values > 86399.

TCA:

'timefrom' => array(
    'exclude' => 0,
    'label' => 'time from',
    'config' => array(
        'type' => 'input',
        'size' => '30',
        'eval' => 'required,time',
    )
),


Files

time_before_after.jpg (13 KB) time_before_after.jpg Values before and after the breaking change Markus Klein, 2015-07-28 13:45
Actions

Also available in: Atom PDF