Project

General

Profile

Actions

Feature #38965

closed

Add support for native date/time fields

Added by Xavier Perseguers over 12 years ago. Updated about 7 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

Also available in: Atom PDF