Bug #91240

Epic #77562: Misbehaviors with datetime values and timezones

Extbase DateTime with native dbType=datetime converts output differently

Added by Benni Mack 5 months ago. Updated 12 days ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Extbase
Start date:
2020-04-30
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

datetimetest.zip - Test extension for the various db types (10.1 KB) Markus Klein, 2020-05-08 16:57

Associated revisions

Revision a614783e (diff)
Added by Benni Mack 12 days ago

[BUGFIX] Do not convert native DATETIME values in Extbase

In contrast to the actual documentation in the code, when using
RDBMS native DATE / TIME / DATETIME fields, the RDBMS does not
adjust these field's values for time zone.
Independent of the actual time zone the DMBS (or the current
session) is using, the data is stored and retrieved "as is".

The only thing that matters is the TZ of PHP, which must be
identical for storing and retrieving the data, otherwise
data is modified.

TYPO3 works just fine like that in Backend, however Extbase'
DataMapper considered the timezone of these fields as "UTC-stored",
which is wrong.

This patch corrects this behaviour to match the rest of the Core.

Resolves: #91240
Releases: master
Change-Id: Idb8e0a6f241aa0ed4e8d4a66129b58e34b9b3292
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053
Tested-by: TYPO3com <>
Tested-by: Thorben Kapp <>
Tested-by: Alexander Schnitzler <>
Tested-by: Benni Mack <>
Reviewed-by: Thorben Kapp <>
Reviewed-by: Alexander Schnitzler <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

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

#2 Updated by Alexander Schnitzler 5 months ago

  • Priority changed from Should have to Must have

#3 Updated by Gerrit Code Review 5 months ago

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

#4 Updated by Gerrit Code Review 5 months ago

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

#5 Updated by Markus Klein 5 months ago

  • File datetimetest.zip added

#6 Updated by Markus Klein 5 months ago

#7 Updated by Markus Klein 5 months ago

  • File deleted (datetimetest.zip)

#8 Updated by Gerrit Code Review 5 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053

#9 Updated by Gerrit Code Review 5 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053

#10 Updated by Gerrit Code Review 5 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053

#11 Updated by Gerrit Code Review 4 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053

#12 Updated by Gerrit Code Review 12 days ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64053

#13 Updated by Benni Mack 12 days ago

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

Also available in: Atom PDF