[TYPO3-core] RFC #12570: Bug: Wrong handling of date-fields

Mathias Gisch m.gisch at mx.uni-saarland.de
Fri Nov 13 07:04:20 CET 2009


Dear Dan,

no, so far I have identified this bug in the stable release (currently 4.2.10) also.


Best regards,

    Mathias


> Are you saying it works correctly in 4.2, but not in trunk?
> 
> Dan Osipov
> Calkins Media
> http://danosipov.com/blog/
> 
> Mathias Gisch wrote:
>> This is an SVN patch request.
>> 
>> Type: Bug
>> 
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=12570
>> 
>> 
>> Branches:
>> Trunk
>> 
>> 
>> Problem:
>> 
>> Regarding the handling of timezone issues I found the following information:
>> 
>>> Since TYPO3 4.2 we changed the handling of timezone: client converts to
>>> UTC before sending form data to server. Server converts from UTC to
>>> server-timezone before storing into database.
>> 
>> Unfortunately the system does not what is stated above. The class.t3lib_tcemain.php gets a UTC value from the backendform and the javascript (client) and substracts the timezone offset. This is logically wrong. The system must add the (positive or negative) timezone offset before storing the timestamp into the database.
>> 
>> On the other hand, when generating the form, the system in class.t3lib_tceforms.php must take the timestamp (which is in local timezone of the server) from the database and substract the timezone offset to send a UTC value to the backendform (client). Currently it adds the timezone offset before sending it, instead of subtracting.
>> 
>> 
>> Solution:
>> See attached patch
>> 
>> 
>> Best regards,
>> 
>> 	Mathias
>> 
>> ***********************************
>> Mathias Gisch
>> Universit?t des Saarlandes
>> Institut f?r Rechtsinformatik
>> Tel: +49 (681) 302 4965
>> m.gisch at mx.uni-saarland.de



More information about the TYPO3-team-core mailing list