Project

General

Profile

Actions

Bug #89914

closed

Native date (TCA dbType) fields are not properly copied or localized

Added by Robert Vock almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-12-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This bug was already reported by Ludwig Rafelsberger for TYPO3 7 (#79925). But the bug was closed without resolution. I just stumpled upon this behavior in TYPO3 v9.5.11

When you use a native DATE-field, translated or copied records will be off-by-one day

Prerequisites:
  • (Server) timezone with positive offset (e.g. Europe/Berlin)

TCA:

  'type' => 'input',
  'eval' => 'date',
  'dbType' => 'date',

How to reproduce:

  • Create such a new record (or use an existing one)
  • Copy it
  • Paste it

Expected result:

  select * from tx_example_domain_model_event;

  uid   pid     some_int_based_tstamp    some_native_dbtype_field
  1     1       1487548800               2019-12-11
  2     1       1487548800               2019-12-11      <-- the copied record as it should be

Actual result:

  select * from tx_example_domain_model_event;

  uid   pid     some_int_based_tstamp    some_native_dbtype_field
  1     1       1487548800               2019-12-11
  2     1       1487548800               2019-12-10      <-- the copied record with wrong date

What happens / the problem:


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #91838: TCA l10n_mode="exclude" with TCA config dbType='datetime' set wrong timezone in translated recordsClosed2020-07-22

Actions
Copied from TYPO3 Core - Bug #79925: Native date/datetime (TCA dbType) fields are not properly copied or localizedClosedLudwig Rafelsberger2017-02-20

Actions
Actions

Also available in: Atom PDF