[TYPO3-core] RFC #12570: Bug: Wrong handling of date-fields
Mathias Gisch
m.gisch at mx.uni-saarland.de
Thu Nov 12 12:06:16 CET 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core_12570.patch
Type: application/octet-stream
Size: 1659 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20091112/238af70c/attachment.obj>
-------------- next part --------------
More information about the TYPO3-team-core
mailing list