Bug #77563
closedEpic #77562: Misbehaviors with datetime values and timezones
Native DBMS datetime columns are not handled correctly
0%
Description
Native datetime
fields (having TCA property dbType
set) are not handled correctly when being persisted. The assumption that all date values are stored for UTC timezone (like it is for integer timestamps) is not correct here.
Given that the editor is currently in CEST (+02:00) and enters the datetime value "2016-09-01 09:30:00" this currently results in exactly this value being persisted - however the correct value would be "2016-09-01 07:30:00", which is sanitized by the timezone offset of 2 hours for CEST.
The datetime lifecycles:- DataHandler receives a timestamp for local timezone from backend forms
- DataHandler converts timestamp to UTC by removing timezone offset
- DataHandler persists changes to database
- for regular integer timestamps that correct
- for dbType datetime values, it's serialized to a string using date - which adds the timezone again - gmdate would be correct
- BackendUtility reads from database
- BackendUtility converts dbType datetime values using strftime - however should add the timezone offset again, if previously processed with gmtime
- Extbase treats the datetime values as UTC and add the timezone offset - which results in an unexpected and wrong addition to the time
Updated by Gerrit Code Review almost 8 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49527
Updated by Gerrit Code Review almost 8 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49526
Updated by Oliver Hader over 7 years ago
- Status changed from Under Review to Closed
Handled by ISO dates in master...