[TYPO3-dev] Datetime bug in 4.2

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Feb 21 22:50:35 CET 2008


Hi!

I think we have a blocking bug for 4.2 :( Sometimes (unclear yet why and when) TYPO3 calculates datetime values absolutely incorrectly. There is a bug report about it (http://bugs.typo3.org/view.php?id=7372). I have PHP 5.2.5 on Mac and 5.2.5 on SuSE. Mac works ok, SuSE does not. Don;t ask me why, I am in complete darkness about it :(

Sympthoms: any datetime checkbox near datetime value shows correct time when just checked. After saving record, datetime in the record jumps 2+1=3 hours ahead (2h is my timezone, looks like added by functions inside jsfunc.tbe_editor.js; 1 hour is server timezone setting in install tool, added on line 1119 in t3lib/class.t3lib_tceforms.php, which is totally wrong thing to do!).

Problem does not happen in 4.1. Problem does not happen for records, added by FE plugins (like comments). So it is obviously BE bug.

Solution: I experimented for three hours and finally removed all "UTC" substrings from t3lib/jsfunc.evalfield.js and getTimezoneOffset() calls from the same file and typo3/jsfunc.tbe_editor.js. Also commented timezone code in tceforms (which must not be there at all, see description of the timezone var!!!). As a result BE works as expected again.

Anyone has objections about removing timezone handling from TYPO3 JS&tceforms (see the patch)? I do not send this as RFC to core list yet because I am not sure while all this UTC handling was added in 4.2. But it obviously does not work properly: editor sets value to 22:35 today and after saving it becomes 1:35 tomorrow. Oops...

(Copying this message directly to Michael & Ingo because I think it is extremely important. Please, send replies to the list)

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: proper-time.diff
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20080221/3eb3c084/attachment.asc>


More information about the TYPO3-dev mailing list