Project

General

Profile

Actions

Bug #68579

closed

TCA field of type time saves different data in database

Added by Markus Klein over 9 years ago. Updated about 7 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 #2

Updated by Markus Klein over 9 years ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42040

Actions #4

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42040

Actions #5

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42040

Actions #6

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42040

Actions #7

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42040

Actions #8

Updated by Markus Klein over 9 years ago

This will be fixed without an upgrade wizard. In case you need information about this issue, feel free to approach me on Slack.

Actions #9

Updated by Georg Ringer over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF