Project

General

Profile

Bug #77563

Updated by Oliver Hader over 7 years ago

Native @datetime@ fields (having TCA property @dbType@ set) are not 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

Back