[TYPO3-core] Patch: Fix Timezone date problems

Bernhard Kraft kraftb at kraftb.at
Wed Jan 18 02:33:07 CET 2006


This is a CVS patch request

Type:
bugfix

Branches:
4.0

BT-reference:
http://bugs.typo3.org/view.php?id=1697

Problem:
When the server and the clients browser are located in different timezones then this problem occurs.
If you output a TCE "datetime" field in the FE (this is done using the servers timezone) the value
will differ from the value the editor from a different timezone entered (where the timestamp calculation
is done using JS on the editors browser). If i.e the server is located in CEST (MET) and the browser is
set to EEST (EET) and the editor inputs 1.1.1980 then the value will get displayed as (23:00 not visible) 31.12.1979


Solution:
The timezone of the server is sent along with the generated TCEforms. Whenever a user inputs a value it is converted
into the correct value concerning the timezone of the server. The client knows his own timezone.
When the value get's displayed in the TCEforms it needs to get translated back into the local (clients) timezone
so the same get's displayed as what was entered.

Also the restriction to years after 1970 (this was coded in revision 1) was removed. So when it is possible
(the client browser needs to support negative timestamps) dates back until 1902 will be allowed.


Files:
bug_1697_4-0.diff


greets,
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1697_4-0.diff
Type: text/x-patch
Size: 4347 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060118/ad6cd3f1/attachment.bin 


More information about the TYPO3-team-core mailing list