#79925Native date/datetime (TCA dbType) fields are not properly copied or localized
Description
Suppose you have a record that contain a field which is configured like so:
'type' => 'input', 'eval' => 'datetime', 'dbType' => 'datetime',
Then, copying or localizing this record leads to the date 1970-01-01 (i.e. the begin of the UNIX epoch) being inserted in the copy/localization instead of the related date from the source record.
—-
How to reproduce:
- Install the attached minimal demo extension (or use any other record which contains native date/datetime fields)
- Create such a new record (or use an existing one)
- Copy it
- Paste it
Expected result:
select * from tx_reproducedbtypebug_foo; uid pid some_int_based_tstamp some_native_dbtype_field 1 1 1487548800 2017-02-20 00:00:00 2 1 1487548800 2017-02-20 00:00:00 <-- the copied record as it should be
Actual result:
select * from tx_reproducedbtypebug_foo; uid pid some_int_based_tstamp some_native_dbtype_field 1 1 1487548800 2017-02-20 00:00:00 2 1 1487548800 1970-01-01 01:33:37 <-- the copied record with wrong date