Project

General

Profile

Actions

Feature #38965

closed

Add support for native date/time fields

Added by Xavier Perseguers about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2012-07-15
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

Description

TYPO3 stores date and date/time values as a Unix timestamp. This feature allows native database types to be used instead.

Native fields must be marked as such in the TCA using the "xtype" key:

'native_date' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:test_nativedate/locallang_db.xml:tx_testnativedate_example.native_date',
    'config' => array(
        'xtype'    => 'date',
        'type'     => 'input',
        'size'     => '8',
        'max'      => '20',
        'eval'     => 'date',
        'checkbox' => '0',
        'default'  => '0'
    )
),

"xtype" can be one of following value:

  • date
  • datetime

and works for any "type" of field.


Files

T3X_test_nativedate.t3x (2.52 KB) T3X_test_nativedate.t3x Xavier Perseguers, 2012-07-15 16:43
T3X_test_nativedate-0_2_0.t3x (2.52 KB) T3X_test_nativedate-0_2_0.t3x Xavier Perseguers, 2012-07-15 21:43
convert-columns.php (2.26 KB) convert-columns.php Xavier Perseguers, 2012-07-16 10:43

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #51918: Native date and datetime values do not consider timezoneClosed2013-09-11

Actions
Precedes TYPO3 Core - Feature #38974: Add support for native date/time fieldsClosed2012-07-16

Actions
Actions #1

Updated by Xavier Perseguers about 12 years ago

This test extension can be used to test that native and timestamp-based date and date/time fields can be properly handled by TYPO3.

Actions #2

Updated by Xavier Perseguers about 12 years ago

DBAL handling (and enhancement of SQL parser) will be added once this approach has been accepted.

Actions #3

Updated by Gerrit Code Review about 12 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12808

Actions #4

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12808

Actions #5

Updated by Xavier Perseguers about 12 years ago

This new version of the test extension supports the key "dbType" instead of "xtype" because reviewers ask for a better naming.

Actions #6

Updated by Xavier Perseguers about 12 years ago

Small script to convert existing data.

Actions #7

Updated by Xavier Perseguers almost 12 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF